Fix some lint nits
Reviewed By: voideanvalue Differential Revision: D2862332 fb-gh-sync-id: 19ab5e8a580137ffe6276b21a9018f7b322dd0cb
This commit is contained in:
parent
6b75d7f497
commit
7e64ad8fc4
|
@ -279,16 +279,16 @@ class ResolutionRequest {
|
||||||
|
|
||||||
_resolveNodeDependency(fromModule, toModuleName) {
|
_resolveNodeDependency(fromModule, toModuleName) {
|
||||||
if (toModuleName[0] === '.' || toModuleName[1] === '/') {
|
if (toModuleName[0] === '.' || toModuleName[1] === '/') {
|
||||||
return this._resolveFileOrDir(fromModule, toModuleName)
|
return this._resolveFileOrDir(fromModule, toModuleName);
|
||||||
} else {
|
} else {
|
||||||
return this._redirectRequire(fromModule, toModuleName).then(
|
return this._redirectRequire(fromModule, toModuleName).then(
|
||||||
realModuleName => {
|
realModuleName => {
|
||||||
if (realModuleName[0] === '.' || realModuleName[1] === '/') {
|
if (realModuleName[0] === '.' || realModuleName[1] === '/') {
|
||||||
// derive absolute path /.../node_modules/fromModuleDir/realModuleName
|
// derive absolute path /.../node_modules/fromModuleDir/realModuleName
|
||||||
let fromModuleParentIdx = fromModule.path.lastIndexOf('node_modules/') + 13
|
const fromModuleParentIdx = fromModule.path.lastIndexOf('node_modules/') + 13;
|
||||||
let fromModuleDir = fromModule.path.slice(0, fromModule.path.indexOf('/', fromModuleParentIdx))
|
const fromModuleDir = fromModule.path.slice(0, fromModule.path.indexOf('/', fromModuleParentIdx));
|
||||||
let absPath = path.join(fromModuleDir, realModuleName)
|
const absPath = path.join(fromModuleDir, realModuleName);
|
||||||
return this._resolveFileOrDir(fromModule, absPath)
|
return this._resolveFileOrDir(fromModule, absPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
const searchQueue = [];
|
const searchQueue = [];
|
||||||
|
|
Loading…
Reference in New Issue