Skip to content

Commit

Permalink
Merge pull request #1 from lprajus2007/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
lprajus2007 committed Feb 1, 2016
2 parents 3dcb32c + d8ac8f9 commit cdf5d0f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ function monkeypatch() {
}
var referencerMod = createModule(referencerLoc);
var referencer = require(referencerLoc);
if (typeof referencer === 'object' && referencer.default) {
referencer = referencer.default;
}

// monkeypatch escope/pattern-visitor
var patternVisitorLoc;
Expand All @@ -89,6 +92,9 @@ function monkeypatch() {
patternVisitorLoc = Module._resolveFilename("./pattern-visitor", escopeMod);
patternVisitorMod = createModule(patternVisitorLoc);
patternVisitor = require(patternVisitorLoc);
if (typeof patternVisitor === 'object' && patternVisitor.default) {
patternVisitor = patternVisitor.default;
}
} catch (err) {
// When eslint uses old escope, we cannot find pattern visitor.
// Fallback to the old way.
Expand Down

0 comments on commit cdf5d0f

Please sign in to comment.