ソースを参照

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

Amr Bashir 4 年 前
コミット
9fbcc02454

+ 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 {

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません