prevent an infinite loop of field conditions

This commit is contained in:
Alex Turchyn
2025-04-08 18:56:29 +03:00
committed by Pete Matsyburka
parent f090e79002
commit e1d5a5b6a6
@@ -175,7 +175,7 @@ export default {
fields () {
if (this.item.submitter_uuid) {
return this.template.fields.reduce((acc, f) => {
if (f !== this.item) {
if (f !== this.item && (!f.conditions?.length || !f.conditions.find((c) => c.field_uuid === this.item.uuid))) {
acc.push(f)
}