Skip to content

Commit

Permalink
revert setAmount location
Browse files Browse the repository at this point in the history
  • Loading branch information
sookmax committed Jun 17, 2024
1 parent 84b2ad6 commit 91dc7a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hera/editor/lib/WinConditionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ export default function WinConditionCard({
min={MIN_AMOUNT}
onChange={({ target: { value } }) => {
const amount = parseInteger(value);
setAmount(amount);
if (amount) {
const newCondition = {
...condition,
amount,
};
if (validate(newCondition)) {
setAmount(amount);
onChange(newCondition);
}
}
Expand Down

0 comments on commit 91dc7a9

Please sign in to comment.