Fix some lint nits

Reviewed By: voideanvalue

Differential Revision: D2862332

fb-gh-sync-id: 19ab5e8a580137ffe6276b21a9018f7b322dd0cb
This commit is contained in:
Christoph Pojer 2016-01-26 11:15:55 -08:00 committed by facebook-github-bot-9
parent 2049eb99fd
commit 4d834b3cb9
1 changed files with 5 additions and 5 deletions

View File

@ -279,16 +279,16 @@ class ResolutionRequest {
_resolveNodeDependency(fromModule, toModuleName) {
if (toModuleName[0] === '.' || toModuleName[1] === '/') {
return this._resolveFileOrDir(fromModule, toModuleName)
return this._resolveFileOrDir(fromModule, toModuleName);
} else {
return this._redirectRequire(fromModule, toModuleName).then(
realModuleName => {
if (realModuleName[0] === '.' || realModuleName[1] === '/') {
// derive absolute path /.../node_modules/fromModuleDir/realModuleName
let fromModuleParentIdx = fromModule.path.lastIndexOf('node_modules/') + 13
let fromModuleDir = fromModule.path.slice(0, fromModule.path.indexOf('/', fromModuleParentIdx))
let absPath = path.join(fromModuleDir, realModuleName)
return this._resolveFileOrDir(fromModule, absPath)
const fromModuleParentIdx = fromModule.path.lastIndexOf('node_modules/') + 13;
const fromModuleDir = fromModule.path.slice(0, fromModule.path.indexOf('/', fromModuleParentIdx));
const absPath = path.join(fromModuleDir, realModuleName);
return this._resolveFileOrDir(fromModule, absPath);
}
const searchQueue = [];