|
@@ -108,6 +108,7 @@
|
|
import { invokeTauriCommand } from './helpers/tauri'
|
|
import { invokeTauriCommand } from './helpers/tauri'
|
|
import type { EventName, EventCallback, UnlistenFn } from './event'
|
|
import type { EventName, EventCallback, UnlistenFn } from './event'
|
|
import { emit, listen, once } from './helpers/event'
|
|
import { emit, listen, once } from './helpers/event'
|
|
|
|
+import { isBrowser } from './helpers/env-check'
|
|
|
|
|
|
/** Allows you to retrieve information about a given monitor. */
|
|
/** Allows you to retrieve information about a given monitor. */
|
|
interface Monitor {
|
|
interface Monitor {
|
|
@@ -1169,7 +1170,7 @@ class WebviewWindow extends WindowManager {
|
|
|
|
|
|
/** The WebviewWindow for the current window. */
|
|
/** The WebviewWindow for the current window. */
|
|
let appWindow
|
|
let appWindow
|
|
-if ('__TAURI_METADATA__' in window) {
|
|
|
|
|
|
+if (isBrowser() && '__TAURI_METADATA__' in window) {
|
|
appWindow = new WebviewWindow(
|
|
appWindow = new WebviewWindow(
|
|
window.__TAURI_METADATA__.__currentWindow.label,
|
|
window.__TAURI_METADATA__.__currentWindow.label,
|
|
{
|
|
{
|