success to call promise

This commit is contained in:
pengfei.zhou
2019-07-22 11:22:19 +08:00
parent eb1c076dfb
commit 410ee99414
6 changed files with 57 additions and 31 deletions

View File

@@ -46,7 +46,7 @@ export function jsCallResolve(contextId: string, callbackId: string, args?: any)
for (let i = 2; i < arguments.length; i++) {
argumentsList.push(arguments[i])
}
Reflect.apply(callback.resolve, context, args)
Reflect.apply(callback.resolve, context, argumentsList)
}
export function jsCallReject(contextId: string, callbackId: string, args?: any) {
@@ -64,7 +64,7 @@ export function jsCallReject(contextId: string, callbackId: string, args?: any)
for (let i = 2; i < arguments.length; i++) {
argumentsList.push(arguments[i])
}
Reflect.apply(callback.reject, context, args)
Reflect.apply(callback.reject, context, argumentsList)
}
export class Context {