diff --git a/package-lock.json b/package-lock.json index 2088610..b8adf59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "obsidian-douban-plugin", - "version": "1.7.8", + "version": "1.7.9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/org/wanxp/file/FileHandler.ts b/src/org/wanxp/file/FileHandler.ts index 5a30d4b..4a61813 100644 --- a/src/org/wanxp/file/FileHandler.ts +++ b/src/org/wanxp/file/FileHandler.ts @@ -136,7 +136,7 @@ export default class FileHandler { const File = await vault.create(filePath, data); // Create the file and open it in the active leaf if (showAfterCreate) { - const leaf = this._app.workspace.splitLeafOrActive(); + const leaf = this._app.workspace.getRightLeaf(true); await leaf.openFile(File); } return true; @@ -170,7 +170,7 @@ export default class FileHandler { // Create the file and open it in the active leaf if (showAfterSuccess) { - const leaf = this._app.workspace.splitLeafOrActive(); + const leaf = this._app.workspace.getRightLeaf(true); await leaf.openFile(File); } return fileExists;