Skip to content

Commit 9fbcc02

Browse files
authored
fix(api.js): fix double window creation, closes #2284 (#2285)
1 parent 3f84381 commit 9fbcc02

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.changes/api-fix-double-window.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"api": patch
3+
---
4+
5+
Fix double window creation

core/tauri/scripts/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tooling/api/src/window.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,8 +1108,10 @@ class WebviewWindow extends WindowManager {
11081108
}
11091109

11101110
/** The WebviewWindow for the current window. */
1111-
// @ts-expect-error
1112-
const appWindow = new WebviewWindow()
1111+
const appWindow = new WebviewWindow(window.__TAURI__.__currentWindow.label, {
1112+
// @ts-expect-error
1113+
skip: true
1114+
})
11131115

11141116
/** Configuration for the window to create. */
11151117
interface WindowOptions {

0 commit comments

Comments
 (0)