We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d37dd0 commit 33000c7Copy full SHA for 33000c7
packager/src/lib/GlobalTransformCache.js
@@ -239,13 +239,17 @@ class GlobalTransformCache {
239
*/
240
static fetchResultFromURI(uri: string): Promise<CachedResult> {
241
return GlobalTransformCache._fetchResultFromURI(uri).catch(error => {
242
- if (!(error instanceof FetchError && error.type === 'request-timeout')) {
+ if (!GlobalTransformCache.isTimeoutError(error)) {
243
throw error;
244
}
245
return this._fetchResultFromURI(uri);
246
});
247
248
249
+ static isTimeoutError(error: Error): boolean {
250
+ return error instanceof FetchError && error.type === 'request-timeout';
251
+ }
252
+
253
shouldFetch(props: FetchProps): boolean {
254
return this._profileSet.has(props.transformOptions);
255
0 commit comments