Skip to content

Commit

Permalink
[Fix] App crash when no handler (_messageHandler) for message from JS.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanskorb committed Aug 5, 2014
1 parent 10a214b commit 68a37a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions WebViewJavascriptBridge/WebViewJavascriptBridge.m
Expand Up @@ -196,6 +196,10 @@ - (void)_flushMessageQueue {
}
} else {
handler = _messageHandler;
if (!handler) {
NSLog(@"WVJB Warning: No handler for message from JS: %@", message);
return responseCallback(@{});
}
}

@try {
Expand Down

0 comments on commit 68a37a2

Please sign in to comment.