fix: Intermitent document highlighted (#12566)

closes #12554
This commit is contained in:
Tom Moor
2026-06-03 07:05:28 -04:00
committed by GitHub
parent a20c8e5371
commit 8464d99589
+6
View File
@@ -264,6 +264,12 @@ class UiStore {
@computed
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;
}