Permalink
Browse files

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

Summary:
davidaurelio ๐Ÿ‘
Closes #10006

Differential Revision: D3898703

fbshipit-source-id: 6d88122ed56108d52bc1ae1b14c7ff7c39fd9b9a
  • Loading branch information...
1 parent bb933c8 commit b3ee595af77b8602ae37dd3e758d40bf6753ff6d @aleclarson aleclarson committed with Facebook Github Bot 5 Sep 21, 2016
Showing with 1 addition and 1 deletion.
  1. +1 โˆ’1 packager/react-packager/src/node-haste/DependencyGraph/ResolutionRequest.js
@@ -533,7 +533,7 @@ function resolveKeyWithPromise([key, promise]) {
}
function isRelativeImport(path) {
- return /^[.][.]?[/]/.test(path);
+ return /^[.][.]?(?:[/]|$)/.test(path);
}
module.exports = ResolutionRequest;

0 comments on commit b3ee595

Please sign in to comment.