Skip to content

Commit

Permalink
Teach utils that async functions are still functions
Browse files Browse the repository at this point in the history
  • Loading branch information
awelles authored and donmccurdy committed Jun 25, 2019
1 parent 743a16b commit 096993e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dat/utils/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const Common = {
},

isFunction: function(obj) {
return Object.prototype.toString.call(obj) === '[object Function]';
return obj instanceof Function;
}

};
Expand Down

1 comment on commit 096993e

@bastienrobert
Copy link

@bastienrobert bastienrobert commented on 096993e Nov 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a class not an instance of Function?

Maybe this could help: https://stackoverflow.com/a/29094209/7355534

Please sign in to comment.