Skip to content

Commit

Permalink
fix(fetch.ts): compatible with node
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Apr 14, 2023
1 parent a688f48 commit c3acb53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/fetch/src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ async function _handleRetryPattern(options: Required<FetchOptions>): Promise<Res
catch (err) {
logger.accident('fetch', 'fetch_failed_retry', (err as Error)?.message || 'fetch failed and retry', err);

if (globalThis.navigator != null && navigator.onLine === false) {
if (globalThis.navigator?.onLine === false) {
throw new Error('offline');
}

Expand Down

0 comments on commit c3acb53

Please sign in to comment.