fix: conditionally initializing getCurrentWebviewWindow

This commit is contained in:
bangonicdd
2024-10-10 14:09:31 +09:00
parent 0f15a93cf8
commit d25a22bf22
2 changed files with 3 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ import { basename } from "@tauri-apps/api/path"
import { createBlankChar, getCharImage } from "./characters"
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
import { isTauri } from "./storage/globalApi"
const appWindow = getCurrentWebviewWindow()
const appWindow = isTauri ? getCurrentWebviewWindow() : null
export const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1