Skip to content

Commit efdcff3

Browse files
committed
Fix nwjs#5428: nw is not defined in devtools extension document
1 parent 38c9a48 commit efdcff3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/resources/api_nw_window.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,9 @@ function onClose(user_force) {
751751

752752
function get_nw() {
753753
appWindowNatives.FixGamePadAPI();
754-
try_nw(window).nw.Window.get();
754+
var nw0 = try_nw(window).nw;
755+
if (nw0)
756+
nw0.Window.get();
755757
}
756758

757759
if (bgPage !== window) {

0 commit comments

Comments
 (0)