Skip to content

Commit

Permalink
Merge pull request uknownothingsnow#70 from warnerliu/master
Browse files Browse the repository at this point in the history
fix CallbackFuntion onCallback not work issue
  • Loading branch information
uknownothingsnow committed Dec 14, 2017
2 parents d3d9091 + 6aa77c8 commit 9d19d28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/src/main/assets/WebViewJavascriptBridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@
//提供给native调用,receiveMessageQueue 在会在页面加载完后赋值为null,所以
function _handleMessageFromNative(messageJSON) {
console.log(messageJSON);
if (receiveMessageQueue && receiveMessageQueue.length > 0) {
if (receiveMessageQueue) {
receiveMessageQueue.push(messageJSON);
} else {
_dispatchMessageFromNative(messageJSON);
}
_dispatchMessageFromNative(messageJSON);

}

var WebViewJavascriptBridge = window.WebViewJavascriptBridge = {
Expand Down

0 comments on commit 9d19d28

Please sign in to comment.