Skip to content

Commit 670bc03

Browse files
committed
check destroyed status
1 parent b947533 commit 670bc03

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/graphql-playground-electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"homepage": "https://github.com/graphcool/graphql-playground",
55
"repository": "graphcool/graphql-playground",
66
"description": "Playground app",
7-
"version": "1.3.7-alpha.2",
7+
"version": "1.3.7-alpha.3",
88
"author": {
99
"name": "Graphcool",
1010
"email": "[email protected]",

packages/graphql-playground-electron/src/main.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ async function forceSend(channel: string, arg: string, byPath?: string) {
8181
} else {
8282
window = currentWindows[0]
8383
}
84-
const destroyed = window ? window.isDestroyed() : null
84+
let destroyed = null
85+
try {
86+
destroyed = window ? window.isDestroyed() : null
87+
} catch (e) {
88+
//
89+
}
8590
if (!window || destroyed) {
8691
window = createWindow()
8792
}

0 commit comments

Comments
 (0)