Skip to content

Commit

Permalink
Prevent setting negative/0 custom yield
Browse files Browse the repository at this point in the history
  • Loading branch information
de-ich committed Dec 22, 2023
1 parent 47d20ee commit 4c666e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/IngredientsList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
<Button>
<Label>Abbrechen</Label>
</Button>
<Button on:click={() => currentYield = newYield} disabled={newYield === 0}>
<Button on:click={() => currentYield = newYield} disabled={Number.isNaN(newYield) || newYield <= 0}>
<Label>OK</Label>
</Button>
</Actions>
Expand Down

0 comments on commit 4c666e2

Please sign in to comment.