Fixed fetcherror, when expression ends with operator and atleast one space

This commit is contained in:
Martin Berg Alstad 2023-02-08 18:01:53 +01:00
parent 6f39c27154
commit 3533b9bc9b

View File

@ -79,7 +79,7 @@ const TruthTablePage: Component = () => {
e.preventDefault(); // Stops the page from reloading onClick
let exp = getInputElement()?.value;
exp = exp.replaceAll("|", "/")
exp = exp.replaceAll("|", "/").trimEnd();
if (exp) {
history.pushState(null, "", `?exp=${ encodeURIComponent(exp) }&simplify=${ simplifyEnabled() }&