aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.ts b/main.ts
index 6b64881..a101d9f 100644
--- a/main.ts
+++ b/main.ts
@@ -40,7 +40,9 @@ inputs.map(input => {
if (parsed !== undefined && parsed.before === '' && parsed.after === '') {
const factor = parsed.number / input.number
- inputs.map(input2 => input2.node.value = prettyPrintNumber(input2.number * factor))
+ if (factor !== 0) {
+ inputs.map(input2 => input2.node.value = prettyPrintNumber(input2.number * factor))
+ }
}
}
}