From 101758a52b516720d45231010113d38918916a72 Mon Sep 17 00:00:00 2001 From: Paul <70213368+LostPaul@users.noreply.github.com> Date: Wed, 3 Jun 2026 10:02:40 +0200 Subject: [PATCH] Fix plugin not loading on some devices --- manifest.json | 2 +- src/main.ts | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index de40a9a..8deb4dd 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "folder-notes", "name": "Folder notes", - "version": "1.8.24", + "version": "1.8.25", "minAppVersion": "1.4.10", "description": "Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.", "author": "Lost Paul", diff --git a/src/main.ts b/src/main.ts index fcb94a3..16aba07 100644 --- a/src/main.ts +++ b/src/main.ts @@ -221,9 +221,11 @@ export default class FolderNotesPlugin extends Plugin { registerFileExplorerObserver(this); const fileExplorer = getFileExplorer(this); - if (fileExplorer) { - // @ts-expect-error use internal API - fileExplorer.view.tree.infinityScroll.rootMargin = 1.5; + // @ts-expect-error use internal API + const infinityScroll = fileExplorer?.view?.tree?.infinityScroll; + + if (infinityScroll) { + infinityScroll.rootMargin = 1.5; } this.registerView(FOLDER_OVERVIEW_VIEW, (leaf: WorkspaceLeaf) => {