webkom / kvittering

🧾 Receipt creator (kvitteringsskildrer)
https://kvittering.abakus.no
MIT License
7 stars 2 forks source link

Application crashes on invalid value in amount field #1058

Closed jonasdeluna closed 1 month ago

jonasdeluna commented 3 months ago

The value gets saved to sessionStorage on a debounce/timer and upon trying to refresh or waiting long enough the site crashes. Probably because I tried to input an expressions such as "100+50".

image

Browsers tested: Mercury 123.0.1 (64-bit) Microsoft Edge Version 126.0.2592.56

norbye commented 3 months ago

Nice catch! Tried debugging a little bit and it seems like the form component sets the amount to undefined for some reason - possibly because the type is set to number and the + messes that up.

It seems we might have potential to handle those errors a little bit nicer as well(:

norbye commented 1 month ago

Resolved in #1126