Skip to content

Commit 7511b3f

Browse files
committed
fix: check for issue when leaf is undefined
1 parent d255b5b commit 7511b3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/internal-plugins/bookmark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export default class BookmarkInternalPlugin extends InternalPluginInjector {
137137

138138
if (requireApiVersion('1.7.2')) {
139139
// TODO: Might improve the performance here.
140-
this.leaf.loadIfDeferred().then(setBookmarkIcon);
140+
this.leaf?.loadIfDeferred().then(setBookmarkIcon);
141141
} else {
142142
setBookmarkIcon();
143143
}

0 commit comments

Comments
 (0)