summaryrefslogtreecommitdiff
path: root/client/src/error.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/error.ts')
-rw-r--r--client/src/error.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/src/error.ts b/client/src/error.ts
index 8935e23..e5848f1 100644
--- a/client/src/error.ts
+++ b/client/src/error.ts
@@ -3,6 +3,9 @@ import type { FetchBaseQueryError } from '@reduxjs/toolkit/query/react';
export const isFetchBaseQueryError = (
error: any
): error is FetchBaseQueryError => {
+ if (error === undefined) {
+ return false;
+ }
return 'data' in error && 'message' in error.data;
};