Skip to content

Commit

Permalink
Merge pull request patriksimek#119 from GingerPlusPlus/disable-promises
Browse files Browse the repository at this point in the history
Don't try to return a promise if Promise is undefined
  • Loading branch information
orta authored May 8, 2018
2 parents 0a24dbb + b356991 commit fa39b68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/contextify.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ const Decontextify = {
} else if (value instanceof WeakMap) { return Decontextify.instance(value, host.WeakMap, deepTraps, flags);
} else if (value instanceof Set) { return Decontextify.instance(value, host.Set, deepTraps, flags);
} else if (value instanceof WeakSet) { return Decontextify.instance(value, host.WeakSet, deepTraps, flags);
} else if (value instanceof Promise) { return Decontextify.instance(value, host.Promise, deepTraps, flags);
} else if (Promise && value instanceof Promise) { return Decontextify.instance(value, host.Promise, deepTraps, flags);
} else {
return Decontextify.object(value, traps, deepTraps, flags, mock);
}
Expand Down

0 comments on commit fa39b68

Please sign in to comment.