Fix restoration of weighted tasks with truncated modifiers (#956)

* Fix restoration of weighted tasks with truncated modifiers

* Reverting this change

Will create a separate PR for this as needed. Doesn't impact the other bug fix.

* Update utils.js
This commit is contained in:
patriceac
2023-03-13 22:06:21 -07:00
committed by GitHub
parent 995bdc77b8
commit 079402cb2f
2 changed files with 15 additions and 3 deletions

View File

@ -176,9 +176,9 @@ function refreshModifiersState(newTags) {
// add modifier to active array
if (!activeTags.map(x => x.name).includes(tag)) { // only add each tag once even if several custom modifier cards share the same tag
const imageModifierCard = modifierCard.cloneNode(true)
imageModifierCard.querySelector('.modifier-card-label p').innerText = shortModifierName
imageModifierCard.querySelector('.modifier-card-label p').innerText = tag.replace(modifierName, shortModifierName)
activeTags.push({
'name': modifierName,
'name': tag,
'element': imageModifierCard,
'originElement': modifierCard
})