Pass both callback values to then

This commit is contained in:
Kevin Sawicki 2016-05-23 15:07:01 -07:00
parent f3af1dbd54
commit 7929daa48c
2 changed files with 6 additions and 2 deletions

View file

@ -47,7 +47,9 @@ var wrapArgs = function (args, visited) {
if (value.constructor != null && value.constructor.name === 'Promise') {
return {
type: 'promise',
then: valueToMeta(function (v) { value.then(v) })
then: valueToMeta(function (onFulfilled, onRejected) {
value.then(onFulfilled, onRejected)
})
}
} else if (v8Util.getHiddenValue(value, 'atomId')) {
return {