Skip to content

Commit

Permalink
Prefer dist.isThenable in isNonThenableFunction test
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmhunt committed Jun 10, 2016
1 parent c7d9055 commit 044c463
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/dust.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@
* @return {Boolean} is `elem` a function without a `.then` property?
*/
dust.isNonThenableFunction = function(elem) {
return typeof elem === 'function' &&
typeof elem.then !== 'function';
return typeof elem === 'function' && !dust.isThenable(elem);
};

/**
Expand Down

0 comments on commit 044c463

Please sign in to comment.