Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Fix open of Full Calendar view if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperupcall committed May 29, 2024
1 parent b5a7986 commit b43738b
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 @@ -72,9 +72,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 b43738b

Please sign in to comment.