sanity check these values aren't NaN - not sure how that's possible though?

This commit is contained in:
thepaperpilot 2022-12-14 21:51:10 -06:00
parent 8f5980ac79
commit 510b1933ab

View file

@ -735,8 +735,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
computedAutoCuttingAmount.value,
Decimal.sub(lastAutoPlantedAmount.value, lastAutoCuttingAmount.value).max(0)
);
lastAutoPlantedAmount.value = plantingAmount;
lastAutoCuttingAmount.value = cuttingAmount;
lastAutoPlantedAmount.value = Decimal.isNaN(plantingAmount) ? 0 : plantingAmount;
lastAutoCuttingAmount.value = Decimal.isNaN(cuttingAmount) ? 0 : cuttingAmount;
const amountCut = Decimal.min(
trees.value,