From 756bc3dec7d6560f7ac3a3152147b3d071739b29 Mon Sep 17 00:00:00 2001 From: Harley White Date: Tue, 18 May 2021 14:27:11 -0400 Subject: [PATCH] Fixed using text inputs for ints --- changelog.md | 2 +- js/utils.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index 58ef9c4..795a6c0 100644 --- a/changelog.md +++ b/changelog.md @@ -5,7 +5,7 @@ - Bars will visually update more quickly. - Fixed a major particle-related issue. - Fixed autoUpgrade. -- Fixed a minor visal issue with tree nodes. +- Fixed a minor visual issue with tree nodes. # v2.5.7 - 5/15/21 - Added a particle system! Not only can it be used for visual effects, but particles can interact with the mouse. They could be used to create golden cookies or collectables, for example. diff --git a/js/utils.js b/js/utils.js index d9ba20f..d692278 100644 --- a/js/utils.js +++ b/js/utils.js @@ -336,9 +336,9 @@ document.title = modInfo.name function toValue(value, oldValue) { if (oldValue instanceof Decimal) return new Decimal (value) - else if (!isNaN(oldValue)) - return value.toNumber() - else return value + if (!isNaN(oldValue)) + return parseInt(value, 10) + return value } // Variables that must be defined to display popups