Ver Fonte

chore: apply temporary change to `__currentWindow` usage

Lucas Nogueira há 3 anos atrás
pai
commit
2792531347
2 ficheiros alterados com 5 adições e 1 exclusões
  1. 0 0
      core/tauri/scripts/bundle.js
  2. 5 1
      tooling/api/src/window.ts

Diff do ficheiro suprimidas por serem muito extensas
+ 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)
   }

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff