Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #244 from christophehurpeau/patch-1
Browse files Browse the repository at this point in the history
fix #243
  • Loading branch information
hzoo committed Feb 1, 2016
2 parents 3dcb32c + d8ac8f9 commit 71fadf0
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 71fadf0

Please sign in to comment.