Skip to content

Commit

Permalink
Update helpers.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
tequdev authored Jul 17, 2024
1 parent f99de7a commit 701fb67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export const assert = <T>(data: T) => {
export const fallback = <T>(data: T, codes: number[] = [DOESNT_EXIST]) => {
if (typeof data === 'number' && data < 0) {
if (codes.includes(data)) {
return undefined as T extends true ? undefined : never
return undefined
}
rollback('api.error', data)
}
Expand Down

0 comments on commit 701fb67

Please sign in to comment.