Skip to content

Commit 10ad78a

Browse files
committed
fix: data may be undefined
1 parent 64fba1d commit 10ad78a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/apis/arknights.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const useLevels = ({ suspense = true }: { suspense?: boolean } = {}) => {
4646
},
4747
})
4848

49-
if ((response.data as any).__serverError) {
49+
if ((response.data as any)?.__serverError) {
5050
return {
5151
...response,
5252
error: (response.data as any).__serverError,

0 commit comments

Comments
 (0)