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

Commit

Permalink
Convert null to empty string inside path.dirname() (#673)
Browse files Browse the repository at this point in the history
Fixes #580.
  • Loading branch information
tensor5 authored and Arcanemagus committed Sep 8, 2016
1 parent b687ae5 commit 47a1e2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/worker-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function refreshModulesPath(modulesDir) {
}

function getESLintInstance(fileDir, config) {
var modulesDir = _path2.default.dirname((0, _atomLinter.findCached)(fileDir, 'node_modules/eslint'));
var modulesDir = _path2.default.dirname((0, _atomLinter.findCached)(fileDir, 'node_modules/eslint') || '');
refreshModulesPath(modulesDir);
return getESLintFromDirectory(modulesDir, config);
}
Expand Down
2 changes: 1 addition & 1 deletion src/worker-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function refreshModulesPath(modulesDir) {
}

export function getESLintInstance(fileDir, config) {
const modulesDir = Path.dirname(findCached(fileDir, 'node_modules/eslint'))
const modulesDir = Path.dirname(findCached(fileDir, 'node_modules/eslint') || '')
refreshModulesPath(modulesDir)
return getESLintFromDirectory(modulesDir, config)
}
Expand Down

0 comments on commit 47a1e2a

Please sign in to comment.