Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dangell7 committed Jul 17, 2024
2 parents 10bd429 + 701fb67 commit 2f91ea6
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 2f91ea6

Please sign in to comment.