feat: let promise reject called

This commit is contained in:
pengfei.zhou
2021-06-22 16:36:34 +08:00
committed by osborn
parent 901d3fdf72
commit 3f6d88bbe7
7 changed files with 7 additions and 7 deletions

View File

@@ -1302,12 +1302,12 @@ var doric = (function (exports) {
}
callNative(namespace, method, args) {
const callbackId = uniqueId('callback');
nativeBridge(this.id, namespace, method, callbackId, args);
return new Promise((resolve, reject) => {
this.callbacks.set(callbackId, {
resolve,
reject,
});
nativeBridge(this.id, namespace, method, callbackId, args);
});
}
register(instance) {