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

This commit is contained in:
Amr Bashir 2021-07-23 15:06:12 +02:00 committed by GitHub
parent 3f84381ea9
commit 9fbcc02454
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

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

File diff suppressed because one or more lines are too long

View File

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