소스 검색

fix(api.js): fix double window creation, closes #2284 (#2285)

Amr Bashir 4 년 전
부모
커밋
9fbcc02454
3개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 0
      .changes/api-fix-double-window.md
  2. 0 0
      core/tauri/scripts/bundle.js
  3. 4 2
      tooling/api/src/window.ts

+ 5 - 0
.changes/api-fix-double-window.md

@@ -0,0 +1,5 @@
+---
+"api": patch
+---
+
+Fix double window creation

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
core/tauri/scripts/bundle.js


+ 4 - 2
tooling/api/src/window.ts

@@ -1108,8 +1108,10 @@ class WebviewWindow extends WindowManager {
 }
 
 /** The WebviewWindow for the current window. */
-// @ts-expect-error
-const appWindow = new WebviewWindow()
+const appWindow = new WebviewWindow(window.__TAURI__.__currentWindow.label, {
+  // @ts-expect-error
+  skip: true
+})
 
 /** Configuration for the window to create. */
 interface WindowOptions {

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