Fixed so that using the loop button actually increases/decreases max on looping instead of cocatenating to string

This commit is contained in:
WBHarry 2025-11-20 17:48:54 +01:00
parent 207220ff7b
commit 7e5db8b0f4

View file

@ -184,9 +184,9 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
const countdown = settings.countdowns[target.id];
const newMax =
countdown.progress.looping === CONFIG.DH.GENERAL.countdownLoopingTypes.increasing.id
? countdown.progress.max + 1
? Number(countdown.progress.max) + 1
: countdown.progress.looping === CONFIG.DH.GENERAL.countdownLoopingTypes.decreasing.id
? Math.max(countdown.progress.max - 1, 0)
? Math.max(Number(countdown.progress.max) - 1, 0)
: countdown.progress.max;
await settings.updateSource({
[`countdowns.${target.id}.progress`]: {