Przeglądaj źródła

chore: apply temporary change to `__currentWindow` usage

Lucas Nogueira 3 lat temu
rodzic
commit
2792531347
2 zmienionych plików z 5 dodań i 1 usunięć
  1. 0 0
      core/tauri/scripts/bundle.js
  2. 5 1
      tooling/api/src/window.ts

Plik diff jest za duży
+ 0 - 0
core/tauri/scripts/bundle.js


+ 5 - 1
tooling/api/src/window.ts

@@ -231,7 +231,11 @@ class WebviewWindowHandle {
   listeners: { [key: string]: Array<EventCallback<any>> }
 
   constructor(label: WindowLabel | null | undefined) {
-    this.label = label ?? window.__TAURI__.__currentWindow.label
+    try {
+      this.label = label ?? window.__TAURI__.__currentWindow.label
+    } catch {
+      this.label = ''
+    }
     // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
     this.listeners = Object.create(null)
   }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików