Skip to content

Commit

Permalink
fix 2.3.3: "Otherwise, if x is an object or function"
Browse files Browse the repository at this point in the history
  • Loading branch information
nswbmw authored and calvinmetcalf committed Feb 9, 2017
1 parent 3391df9 commit 741b5d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ handlers.reject = function (self, error) {
function getThen(obj) {
// Make sure we only access the accessor once as required by the spec
var then = obj && obj.then;
if (obj && typeof obj === 'object' && typeof then === 'function') {
if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {
return function appyThen() {
then.apply(obj, arguments);
};
Expand Down

0 comments on commit 741b5d7

Please sign in to comment.