From b41fa665fa334f0037de294d8e0585a5cf94c649 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 2 Aug 2024 00:59:06 +0800 Subject: [PATCH] fix: loadFile options hash --- src/main/window.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/window.ts b/src/main/window.ts index 8e2dfaf61..34ddc81c8 100644 --- a/src/main/window.ts +++ b/src/main/window.ts @@ -77,13 +77,19 @@ export function createWindow( } else { const openPath = path.resolve( __dirname, - `../renderer/index.html${options?.extraPath || ""}`, + "../renderer/index.html", ) window.loadFile( openPath, + { + hash: options?.extraPath, + }, ) logger.log( openPath, + { + hash: options?.extraPath, + }, ) } @@ -235,7 +241,7 @@ export const createSettingWindow = () => { return } const window = createWindow({ - extraPath: "/#settings", + extraPath: "#settings", width: 700, height: 600, resizable: false,