Jelajahi Sumber

chore: apply temporary change to `__currentWindow` usage

Lucas Nogueira 3 tahun lalu
induk
melakukan
2792531347
2 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 0 0
      core/tauri/scripts/bundle.js
  2. 5 1
      tooling/api/src/window.ts

File diff ditekan karena terlalu besar
+ 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)
   }

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini