mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-03-16 07:08:13 +01:00
kalk_web: Fixed error on empty result
This commit is contained in:
parent
150a0c7632
commit
d21202a446
0
kalk/wasm-build.sh
Executable file → Normal file
0
kalk/wasm-build.sh
Executable file → Normal file
11478
kalk_web/package-lock.json
generated
11478
kalk_web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user