Fix build on windows

Summary: Fix for build on windows

Reviewed By: mweststrate

Differential Revision: D20601309

fbshipit-source-id: 9845964513d7904f58e3511b1c4daa8716f7b054
This commit is contained in:
Anton Nikolaev
2020-03-24 08:04:47 -07:00
committed by Facebook GitHub Bot
parent 0a8d8f44ff
commit d9d3be33b4

View File

@@ -29,10 +29,11 @@ export default async (packageDir: string) => {
} }
} }
} }
if (packageDir === '/') { const nextDir = path.dirname(packageDir);
if (!nextDir || nextDir === '/' || nextDir === packageDir) {
break; break;
} }
packageDir = path.dirname(packageDir); packageDir = nextDir;
} }
return watchDirs; return watchDirs;
}; };