diff options
author | Joris | 2020-02-03 09:41:49 +0100 |
---|---|---|
committer | Joris | 2020-02-03 09:41:49 +0100 |
commit | ed30773e7963d9e70902d834af97937f6f0f9869 (patch) | |
tree | bca2bd6e71db8cc8b8c58f380e3ea334a807e3e1 | |
parent | 6b9fef06847e55aee2f93ece513a0d62ee7e359c (diff) |
Don’t apply ingredients factor if it’s null
-rw-r--r-- | main.ts | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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)) + } } } } |