Fixed tagify error on selection

This commit is contained in:
WBHarry 2025-06-06 16:47:11 +02:00
parent 448abb5f50
commit ca319d7fac

View file

@ -444,9 +444,8 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
Object.keys(choice).forEach(checkboxNr => {
const checkbox = choice[checkboxNr];
if (
choiceKey === type && removed
? checkbox.data.includes(option)
: checkbox.data.length < checkbox.amount
choiceKey === type &&
(removed ? checkbox.data.includes(option) : checkbox.data.length < checkbox.amount)
) {
acc = `levels.${this.levelup.currentLevel}.choices.${choiceKey}.${checkboxNr}.data`;
}