mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
@@ -264,6 +264,12 @@ class UiStore {
|
|||||||
|
|
||||||
@computed
|
@computed
|
||||||
get activeCollectionId(): string | undefined {
|
get activeCollectionId(): string | undefined {
|
||||||
|
// Derive from the active document so it resolves even if the collection
|
||||||
|
// loads after the document became active.
|
||||||
|
const activeDocument = this.getPrimaryActiveModel<Document>(Document);
|
||||||
|
if (activeDocument?.isActive && activeDocument.collectionId) {
|
||||||
|
return activeDocument.collectionId;
|
||||||
|
}
|
||||||
return this.getPrimaryActiveModel<Collection>(Collection)?.id;
|
return this.getPrimaryActiveModel<Collection>(Collection)?.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user