Skip to content

Commit

Permalink
Wrap callbackFromNative in Promise.resolve (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Oct 2, 2018
1 parent 242465a commit 67da7b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/www/ios/ios-wkwebview-exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ var iOSExec = function () {
iOSExec.nativeCallback = function (callbackId, status, message, keepCallback, debug) {
var success = status === 0 || status === 1;
var args = convertMessageToArgsNativeToJs(message);
cordova.callbackFromNative(callbackId, success, status, args, keepCallback); // eslint-disable-line
Promise.resolve().then(function () {
cordova.callbackFromNative(callbackId, success, status, args, keepCallback); // eslint-disable-line
});
};

// for backwards compatibility
Expand Down

0 comments on commit 67da7b9

Please sign in to comment.