kalk_web: Fixed error on empty result

This commit is contained in:
PaddiM8 2021-05-19 09:45:19 +02:00
parent 150a0c7632
commit d21202a446
3 changed files with 18 additions and 11462 deletions

0
kalk/wasm-build.sh Executable file → Normal file
View File

11478
kalk_web/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -59,7 +59,7 @@
try {
if (!kalkContext) kalkContext = new kalk.Context();
const result = kalkContext.evaluate(input);
const estimate = result.estimate();
const estimate = result?.estimate() ?? null;
if (result && result.getValue() != 0) {
const sciNot = result.toScientificNotation();
if (sciNot.exponent > 7 || sciNot.exponent < -6) {