diff options
author | Michael Hunteman <michael@huntm.net> | 2024-09-20 11:19:34 -0700 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2024-09-20 11:19:34 -0700 |
commit | a54a93b724a6104213b17271fc298e37adedc1c5 (patch) | |
tree | ea5d013e5a25806788b0dfd18d5e638ed141e4a7 /client/src/error.ts | |
parent | 3aad1960e4ee9bce1155b4154c596daf09ee0ae5 (diff) |
Use redux for updating snackbar
Diffstat (limited to 'client/src/error.ts')
-rw-r--r-- | client/src/error.ts | 3 |
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; }; |