mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-10 22:52:34 +01:00
This commit is contained in:
parent
668e5826e2
commit
8ba7a703ed
5 changed files with 6 additions and 6 deletions
|
|
@ -74,7 +74,7 @@ export const openFileById = async (options: {
|
|||
};
|
||||
|
||||
export const openAsset = (app: App, assetPath: string, page: number | string, position?: string) => {
|
||||
const suffix = pathPosix().extname(assetPath.split("?page")[0]);
|
||||
const suffix = pathPosix().extname(assetPath).split("?")[0];
|
||||
if (!Constants.SIYUAN_ASSETS_EXTS.includes(suffix)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -421,7 +421,7 @@ const switchEditor = (editor: Editor, options: IOpenFileOptions, allModels: IMod
|
|||
const newTab = (options: IOpenFileOptions) => {
|
||||
let tab: Tab;
|
||||
if (options.assetPath) {
|
||||
const suffix = pathPosix().extname(options.assetPath.split("?page")[0]);
|
||||
const suffix = pathPosix().extname(options.assetPath).split("?")[0];
|
||||
if (Constants.SIYUAN_ASSETS_EXTS.includes(suffix)) {
|
||||
let icon = "iconPDF";
|
||||
if (Constants.SIYUAN_ASSETS_IMAGE.includes(suffix)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue