Skip to content

Commit

Permalink
Merge pull request #207 from uphy/fix/obsidian-1.7.4-changes
Browse files Browse the repository at this point in the history
fix: 'view.reload is not a function' issue introduced in Obsidian 1.7.4
  • Loading branch information
uphy authored Nov 26, 2024
2 parents e152649 + e9f8f42 commit d8e12b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ui/reminder-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,13 @@ export class ReminderListItemViewProxy {
private getViews() {
return this.workspace
.getLeavesOfType(VIEW_TYPE_REMINDER_LIST)
.map(leaf => leaf.view as ReminderListItemView);
.map((leaf) => {
if (leaf && leaf.view instanceof ReminderListItemView) {
return leaf.view as ReminderListItemView;
}
return null;
})
.filter((view) => view != null);
}

invalidate() {
Expand Down

0 comments on commit d8e12b4

Please sign in to comment.