feat: Changed flag to support negative value comparisons

This commit is contained in:
NunoSempere 2022-04-11 13:40:51 -04:00
parent a15c573f94
commit 2e4c76a257

View File

@ -30,7 +30,12 @@ export function SubmitButton({
if (!!Number(inputValue) && inputValue >= 0) { if (!!Number(inputValue) && inputValue >= 0) {
nextStepInput(obj); nextStepInput(obj);
} else if (!!Number(inputValue) && inputValue < 0) { } else if (!!Number(inputValue) && inputValue < 0) {
alert("Negative numbers not yet allowed"); alert("Suport for negative numbers experimental");
nextStepInput({
...obj,
inputValue: inputValue,
squiggleString: inputValue,
});
} else { } else {
let potentialSquiggleOutput = await squiggleWrapper(inputValue); let potentialSquiggleOutput = await squiggleWrapper(inputValue);
if (!!Number(potentialSquiggleOutput)) { if (!!Number(potentialSquiggleOutput)) {