Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Bug fix in recent change in iOSExec.nativeCallback (#78)
Browse files Browse the repository at this point in the history
Now, callbackFromNative will actually get called async
  • Loading branch information
alexhisen authored and jcesarmobile committed Feb 19, 2019
1 parent 76bca66 commit 6f468f4
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);
Promise.resolve(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 6f468f4

Please sign in to comment.