Skip to content

Commit b3fae13

Browse files
committed
fix: skip ensureSideLeaf if leaf already exists
1 parent 8968ab3 commit b3fae13

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,11 @@ export default class InitiativeTracker extends Plugin {
630630
}
631631

632632
async addTrackerView() {
633+
if (
634+
this.app.workspace.getLeavesOfType(INITIATIVE_TRACKER_VIEW)?.length
635+
) {
636+
return;
637+
}
633638
await this.app.workspace.ensureSideLeaf(
634639
INITIATIVE_TRACKER_VIEW,
635640
"right",

0 commit comments

Comments
 (0)