Parcourir la source

chore: apply temporary change to `__currentWindow` usage

Lucas Nogueira il y a 3 ans
Parent
commit
2792531347
2 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 0 0
      core/tauri/scripts/bundle.js
  2. 5 1
      tooling/api/src/window.ts

Fichier diff supprimé car celui-ci est trop grand
+ 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)
   }

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff