File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 42
42
43
43
function _doSend(message, responseCallback) {
44
44
if (responseCallback) {
45
- var callbackId = 'js_cb_ '+(uniqueId++)
45
+ var callbackId = 'cb_ '+(uniqueId++)+'_'+new Date().getTime( )
46
46
responseCallbacks[callbackId] = responseCallback
47
47
message['callbackId'] = callbackId
48
48
}
63
63
64
64
if (message.responseId) {
65
65
var responseCallback = responseCallbacks[message.responseId]
66
+ if (!responseCallback) { return; }
66
67
responseCallback(message.responseData)
67
68
delete responseCallbacks[message.responseId]
68
69
} else {
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ - (void)_flushMessageQueue {
123
123
NSString *messageQueueString = [_webView stringByEvaluatingJavaScriptFromString: @" WebViewJavascriptBridge._fetchQueue();" ];
124
124
NSArray * messages = [messageQueueString componentsSeparatedByString: MESSAGE_SEPARATOR];
125
125
for (NSString *messageJSON in messages) {
126
- [self _log: @" received " json: messageJSON];
126
+ [self _log: @" receivd " json: messageJSON];
127
127
128
128
NSDictionary * message = [self _deserializeMessageJSON: messageJSON];
129
129
You can’t perform that action at this time.
0 commit comments