Skip to content

Commit 12338ed

Browse files
committed
Allow for responses to be sent even if there is not one expected. If no response is expected, the response is simply ignored
1 parent 0d41319 commit 12338ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

WebViewJavascriptBridge/WebViewJavascriptBridge.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ - (void)_flushMessageQueue {
140140
NSDictionary* message = [NSDictionary dictionaryWithObjectsAndKeys: callbackId, @"responseId", responseData, @"responseData", nil];
141141
[self _queueMessage:message];
142142
};
143+
} else {
144+
responseCallback = ^(id ignoreResponseData) {
145+
// Do nothing
146+
};
143147
}
144148

145149
WVJBHandler handler = self.messageHandler;

0 commit comments

Comments
 (0)