mirror of
https://github.com/status-im/metro.git
synced 2025-02-08 01:03:28 +00:00
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
This commit is contained in:
parent
ba88046c24
commit
9bd757822e
@ -129,7 +129,7 @@ class Module {
|
|||||||
return this._cache.get(
|
return this._cache.get(
|
||||||
this.path,
|
this.path,
|
||||||
'isHaste',
|
'isHaste',
|
||||||
() => Promise.resolve(this._getHasteName() != null),
|
() => Promise.resolve().then(() => this._getHasteName() != null),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user