Browse Source

chore: apply temporary change to `__currentWindow` usage

Lucas Nogueira 3 năm trước cách đây
mục cha
commit
2792531347
2 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 0 0
      core/tauri/scripts/bundle.js
  2. 5 1
      tooling/api/src/window.ts

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 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)
   }

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác