fix workspace freeze on load

This commit is contained in:
zsviczian committed 2026-01-25 16:43:13 +01:00
1 parent ff5780b703
commit e25083504b
1 file changed
+9 -2
+9 -2
View File
@@ -170,7 +170,11 @@ export class ExcalidrawSidepanelView extends ItemView {
});
this.resolveReady?.();
this.resolveReady = null;
await this.restorePersistedTabs();
if(this.app.workspace.layoutReady) {
await this.restorePersistedTabs();
} else {
this.restorePersistedTabs();
};
this.updateEmptyStateVisibility();
}
@@ -332,7 +336,10 @@ export class ExcalidrawSidepanelView extends ItemView {
const tab = new ExcalidrawSidepanelTab(
title,
{
activate: (target) => this.setActiveTab(target),
activate: (target) => {
this.setActiveTab(target);
this.reveal();
},
close: (target) => this.removeTab(target),
updateTitle: (target) => this.updateTabOptionTitle(target),
plugin: this.plugin,