Fixing the packager infinite loop on Windows

Summary: The issue here https://github.com/facebook/react-native/issues/2787

The root path '/' dosn't match windows root path
Closes https://github.com/facebook/react-native/pull/2789

Reviewed By: @​svcscm

Differential Revision: D2452718

Pulled By: @martinbigio
This commit is contained in:
mqli 2015-09-18 06:03:03 -07:00 committed by facebook-github-bot-4
parent b1943d588c
commit d7dadf9a5c
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ class ResolutionRequest {
realModuleName => {
const searchQueue = [];
for (let currDir = path.dirname(fromModule.path);
currDir !== '/';
currDir !== path.parse(fromModule.path).root;
currDir = path.dirname(currDir)) {
searchQueue.push(
path.join(currDir, 'node_modules', realModuleName)