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) => {