Skip to content

Commit

Permalink
fix: error due to cleared input
Browse files Browse the repository at this point in the history
  • Loading branch information
seleb committed May 12, 2021
1 parent 4b54d76 commit ee80068
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export function useCheckbox(set: (checked: boolean) => void) {
export function useRange(set: (value: number) => void) {
return useCallback(
(event: JSXInternal.TargetedEvent<HTMLInputElement, Event>) => {
if (event.currentTarget.value === '') return;
set(parseFloat(event.currentTarget.value));
},
[set]
Expand Down

0 comments on commit ee80068

Please sign in to comment.