fix: Sidebar missing on public documents when accessing with valid team token
This commit is contained in:
@@ -467,10 +467,16 @@ async function loadDocument({
|
||||
await share.update({
|
||||
lastAccessedAt: new Date(),
|
||||
});
|
||||
|
||||
// Cannot use document.collection here as it does not include the
|
||||
// documentStructure by default through the relationship.
|
||||
collection = await Collection.findByPk(document.collectionId);
|
||||
invariant(collection, "collection not found");
|
||||
|
||||
return {
|
||||
document,
|
||||
share,
|
||||
collection: document.collection,
|
||||
collection,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user