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 коммит произвёл Facebook Github Bot 5
Родитель bb933c8ad4
Коммит b3ee595af7
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

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