diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts index 61cdcde77..0b85f2187 100644 --- a/app/src/editor/util.ts +++ b/app/src/editor/util.ts @@ -62,6 +62,10 @@ export const openFileById = async (options: { }; export const openAsset = (assetPath: string, page: number | string, position?: string) => { + const suffix = pathPosix().extname(assetPath.split("?page")[0]); + if (!Constants.SIYUAN_ASSETS_EXTS.includes(suffix)) { + return; + } openFile({ assetPath, page,