Fix 'isRelativeImport' to allow require('.') and require('..')

Summary:
davidaurelio 👍
Closes https://github.com/facebook/react-native/pull/10006

Differential Revision: D3898703

fbshipit-source-id: 6d88122ed56108d52bc1ae1b14c7ff7c39fd9b9a
This commit is contained in:
aleclarson 2016-09-20 20:52:30 -07:00 committed by Facebook Github Bot 5
parent bb1666a93a
commit 6bcad15e7b
1 changed files with 1 additions and 1 deletions

View File

@ -533,7 +533,7 @@ function resolveKeyWithPromise([key, promise]) {
}
function isRelativeImport(path) {
return /^[.][.]?[/]/.test(path);
return /^[.][.]?(?:[/]|$)/.test(path);
}
module.exports = ResolutionRequest;