Skip to content

Commit

Permalink
fix(isGeneratorFunction): check for GeneratorFunction instead of Asyn…
Browse files Browse the repository at this point in the history
…cFunction
  • Loading branch information
char0n committed Apr 27, 2017
1 parent 9a9fda2 commit 853f934
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/isGeneratorFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ try {
*/
/* eslint-enable max-len */
const isGeneratorFunction = (val) => {
const toStringCheck = Object.prototype.toString.call(val) === '[object AsyncFunction]';
const toStringCheck = Object.prototype.toString.call(val) === '[object GeneratorFunction]';
const legacyConstructorCheck = isNotNull(GeneratorFunction) && val instanceof GeneratorFunction;

return or(toStringCheck, legacyConstructorCheck);
Expand Down

0 comments on commit 853f934

Please sign in to comment.