fixes bug in Relationship field

This commit is contained in:
James
2020-05-21 20:17:23 -04:00
parent d0a47836f9
commit a0f6b9e90c
4 changed files with 5 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ class Relationship extends Component {
some(relationsToSearch, async (relation, callback) => {
const response = await fetch(`${serverURL}${api}/${relation}?limit=${maxResultsPerRequest}&page=${lastLoadedPage}`, {
headers: {
Authorization: `Bearer ${token}`,
Authorization: `JWT ${token}`,
},
});

View File

@@ -84,7 +84,8 @@ const DefaultList = (props) => {
return (
<>
<Link to={`${admin}/collections/${collection.slug}/${rowData.id}`}>
{cellData}
{typeof cellData === 'string' && cellData}
{typeof cellData === 'object' && JSON.stringify(cellData)}
</Link>
</>
);