Skip to content

Commit 61d56cb

Browse files
committed
Remove the check for triggering elements and always set all model element values.
1 parent 0257bdf commit 61d56cb

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

django_unicorn/static/js/component.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -330,19 +330,7 @@ export class Component {
330330
}
331331

332332
this.modelEls.forEach((element) => {
333-
let shouldSetValue = false;
334-
335-
triggeringElements.forEach((triggeringElement) => {
336-
if (!element.isSame(triggeringElement)) {
337-
shouldSetValue = true;
338-
}
339-
});
340-
341-
// Set the value if there are no triggering elements (happens on initial page load)
342-
// or when the model element doesn't match one of the triggering elements
343-
if (shouldSetValue || triggeringElements.length === 0) {
344-
this.setValue(element);
345-
}
333+
this.setValue(element);
346334
});
347335
}
348336

0 commit comments

Comments
 (0)