Skip to content

Commit af536b9

Browse files
committed
account for undefined DOMException
1 parent e675a32 commit af536b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/toolkit/src/query/fetchBaseQuery.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@ export function fetchBaseQuery({
305305
return {
306306
error: {
307307
status:
308-
(e instanceof Error || e instanceof DOMException) &&
308+
(e instanceof Error ||
309+
(typeof DOMException !== 'undefined' &&
310+
e instanceof DOMException)) &&
309311
e.name === 'TimeoutError'
310312
? 'TIMEOUT_ERROR'
311313
: 'FETCH_ERROR',

0 commit comments

Comments
 (0)