Permalink
Browse files

Allow for responses to be sent even if there is not one expected. If …

…no response is expected, the response is simply ignored
  • Loading branch information...
1 parent 0d41319 commit 12338ed2f4d53e1f2b37578cd240d37749e52436 @marcuswestin committed Dec 10, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 WebViewJavascriptBridge/WebViewJavascriptBridge.m
@@ -140,6 +140,10 @@ - (void)_flushMessageQueue {
NSDictionary* message = [NSDictionary dictionaryWithObjectsAndKeys: callbackId, @"responseId", responseData, @"responseData", nil];
[self _queueMessage:message];
};
+ } else {
+ responseCallback = ^(id ignoreResponseData) {
+ // Do nothing
+ };
}
WVJBHandler handler = self.messageHandler;

0 comments on commit 12338ed

Please sign in to comment.