Skip to content

Commit

Permalink
fix(core): do not panic when skip_tabs is a number
Browse files Browse the repository at this point in the history
The config parameter `skip_tabs` is usually a string. However, when the user puts only one tab, it
is treated as a number, and the type system panics.

Ref. #58
  • Loading branch information
Zanna_37 committed Aug 23, 2023
1 parent fce3ca3 commit 165a46f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/swipe-navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const SwipeNavigationConfigSchema = z.object({
.optional(),
prevent_default: z.boolean().optional(),
skip_hidden: z.boolean().optional(),
skip_tabs: z.string().optional(),
skip_tabs: z.coerce.string().optional(),
swipe_amount: z.number().optional(),
wrap: z.boolean().optional()
});
Expand Down

0 comments on commit 165a46f

Please sign in to comment.