Skip to content

Commit 074be9c

Browse files
committed
Fix warnings of null currentNWWindow when onDocumentStartEnd is handled
1 parent e1a060d commit 074be9c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/resources/api_nw_newwin.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,8 @@ function onLoadingStateChanged(status) {
723723
}
724724

725725
function onDocumentStartEnd(start, frame, top_routing_id) {
726+
if (!currentNWWindow)
727+
return;
726728
if (start) {
727729
dispatchEventIfExists(currentNWWindow, "onDocumentStart", [frame, top_routing_id]);
728730
}

0 commit comments

Comments
 (0)