Skip to content

Commit

Permalink
updated typecheck for regex and remove FlowFixMe
Browse files Browse the repository at this point in the history
  • Loading branch information
ro-savage committed Mar 3, 2017
1 parent b2e1731 commit ec46287
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jest-haste-map/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,8 @@ class HasteMap extends EventEmitter {
_ignore(filePath: Path): boolean {
const ignorePattern = this._options.ignorePattern;
const ignoreMatched =
Object.prototype.toString.call(ignorePattern) === '[object RegExp]'
? ignorePattern.test(filePath) // $FlowFixMe
ignorePattern instanceof RegExp
? ignorePattern.test(filePath)
: ignorePattern(filePath);

return ignoreMatched ||
Expand Down

0 comments on commit ec46287

Please sign in to comment.