소스 검색

chore: apply temporary change to `__currentWindow` usage

Lucas Nogueira 3 년 전
부모
커밋
2792531347
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 0
      core/tauri/scripts/bundle.js
  2. 5 1
      tooling/api/src/window.ts

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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)
   }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.