From 7511b3f4077899406ffb6cc015a1062a7a1e55b7 Mon Sep 17 00:00:00 2001 From: FlorianWoelki Date: Wed, 4 Dec 2024 09:32:46 +0100 Subject: [PATCH] fix: check for issue when leaf is undefined --- src/internal-plugins/bookmark.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal-plugins/bookmark.ts b/src/internal-plugins/bookmark.ts index 602ba938..b4fa6461 100644 --- a/src/internal-plugins/bookmark.ts +++ b/src/internal-plugins/bookmark.ts @@ -137,7 +137,7 @@ export default class BookmarkInternalPlugin extends InternalPluginInjector { if (requireApiVersion('1.7.2')) { // TODO: Might improve the performance here. - this.leaf.loadIfDeferred().then(setBookmarkIcon); + this.leaf?.loadIfDeferred().then(setBookmarkIcon); } else { setBookmarkIcon(); }