Skip to content

Commit

Permalink
add 'Fix open of Full Calendar view if it already exists obsidian-com…
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-kugler committed Oct 21, 2024
1 parent e086158 commit 50143fc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ export default class FullCalendarPlugin extends Plugin {
active: true,
});
} else {
await Promise.all(
leaves.map((l) => (l.view as CalendarView).onOpen())
);
const leaf = leaves[0];
await leaf.setViewState({
type: FULL_CALENDAR_VIEW_TYPE,
active: true,
});
}
}
async onload() {
Expand Down

0 comments on commit 50143fc

Please sign in to comment.