Sfoglia il codice sorgente

chore: apply temporary change to `__currentWindow` usage

Lucas Nogueira 3 anni fa
parent
commit
2792531347
2 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 0 0
      core/tauri/scripts/bundle.js
  2. 5 1
      tooling/api/src/window.ts

File diff suppressed because it is too large
+ 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)
   }

Some files were not shown because too many files changed in this diff