mirror of https://github.com/espruino/BangleApps
promenu: fix values going below minimum
parent
1fa407b305
commit
7822445b6a
|
@ -140,7 +140,7 @@ E.showMenu = (items?: Menu): MenuInstance => {
|
|||
|
||||
item.value += (-dir||1) * (item.step||1);
|
||||
|
||||
if (item.min && item.value < item.min)
|
||||
if ("min" in item && item.value < item.min)
|
||||
item.value = item.wrap ? item.max as number : item.min;
|
||||
|
||||
if ("max" in item && item.value > item.max)
|
||||
|
|
Loading…
Reference in New Issue