Skip to content

Commit

Permalink
fix(api.js): fix double window creation, closes #2284 (#2285)
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Jul 23, 2021
1 parent 3f84381 commit 9fbcc02
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changes/api-fix-double-window.md
@@ -0,0 +1,5 @@
---
"api": patch
---

Fix double window creation
2 changes: 1 addition & 1 deletion core/tauri/scripts/bundle.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions tooling/api/src/window.ts
Expand Up @@ -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 {
Expand Down

0 comments on commit 9fbcc02

Please sign in to comment.