Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53400c6

Browse files
authored
fix: Check if an API error has data before checking the message (#3427)
This was causing the app to crash with an error. I found this manuallyby looking through the obfuscated sources in DevTools. It's adata-point for#3425 though!
1 parente1da2b6 commit53400c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎site/src/api/errors.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ export type ApiError = AxiosError<ApiErrorResponse> & { response: AxiosResponse<
2525
exportconstisApiError=(err:any):err isApiError=>{
2626
if(axios.isAxiosError(err)){
2727
constresponse=err.response?.data
28+
if(!response){
29+
returnfalse
30+
}
2831

2932
return(
3033
typeofresponse.message==="string"&&

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp