Skip to content

Commit

Permalink
fix: console error.
Browse files Browse the repository at this point in the history
  • Loading branch information
vipzhicheng committed Feb 22, 2023
1 parent c3fa565 commit 7f177e4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v0.2.7

- fix: console error.

## v0.2.6

- feat: add left sidebar option.
Expand Down
14 changes: 7 additions & 7 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@ logseq.onSettingsChanged(() => {
provideStyle();
});

logseq.App.onGraphAfterIndexed(() => {
clearCachedDays();
});
logseq.App.onCurrentGraphChanged(() => {
clearCachedDays();
});

const calendarKeyPrefix = "block-calendar-";

const calendarWidgetSlot = "widget";
Expand Down Expand Up @@ -258,6 +251,13 @@ function provideYearlyCalendarUI(calendar: string, slot: string) {
}

const main = async () => {
logseq.App.onGraphAfterIndexed(() => {
clearCachedDays();
});
logseq.App.onCurrentGraphChanged(() => {
clearCachedDays();
});

const getLang = getLangFunc(logseq.settings?.defaultLanguage);

logseq.Editor.registerSlashCommand("Insert Block Calendar", async () => {
Expand Down

0 comments on commit 7f177e4

Please sign in to comment.