Permalink
Browse files

packager: Module.js: cover the error cases

Summary: We want any exception thrown by `_getHasteName` to be captured by the promise instead of breaking the outer stack.

Reviewed By: davidaurelio

Differential Revision: D4754825

fbshipit-source-id: 173c7c8867da73efb198ed3159704d6fd0e7b87d
  • Loading branch information...
jeanlauliac authored and facebook-github-bot committed Mar 22, 2017
1 parent 909d2e5 commit 30548427efe1e5260faa0ea6c3367fab5407ebfa
Showing with 1 addition and 1 deletion.
  1. +1 −1 packager/src/node-haste/Module.js
@@ -129,7 +129,7 @@ class Module {
return this._cache.get(
this.path,
'isHaste',
() => Promise.resolve(this._getHasteName() != null),
() => Promise.resolve().then(() => this._getHasteName() != null),
);
}

0 comments on commit 3054842

Please sign in to comment.