mirror of
https://github.com/thepaperpilot/Super-Auto-Coots.git
synced 2024-11-22 00:21:33 +00:00
Make persistence NaN check not activate if current value is NaN
This commit is contained in:
parent
57aafb0538
commit
67081c4b05
1 changed files with 4 additions and 1 deletions
|
@ -94,7 +94,10 @@ function getStackTrace() {
|
|||
|
||||
function checkNaNAndWrite<T extends State>(persistent: Persistent<T>, value: T) {
|
||||
// Decimal is smart enough to return false on things that aren't supposed to be numbers
|
||||
if (Decimal.isNaN(value as DecimalSource)) {
|
||||
if (
|
||||
Decimal.isNaN(value as DecimalSource) &&
|
||||
!Decimal.isNaN(persistent.value as DecimalSource)
|
||||
) {
|
||||
if (!state.hasNaN) {
|
||||
player.autosave = false;
|
||||
state.hasNaN = true;
|
||||
|
|
Loading…
Reference in a new issue