From 21fa56e8829a0d81b02c8854993554bda4c4f11d Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 28 Apr 2023 19:59:14 +0800 Subject: [PATCH] :bug: https://github.com/siyuan-note/siyuan/issues/8126 --- app/src/editor/util.ts | 4 ++++ 1 file changed, 4 insertions(+) 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,