Skip to content

Commit 395cdd9

Browse files
author
Mattia Roccoberton
authored
Merge pull request #15 from blocknotes/fix-evaluate-condition-data-if
Fix evaluate condition data-if
2 parents 57d1c81 + 0508add commit 395cdd9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/assets/javascripts/activeadmin/dynamic_fields.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@
9191
}
9292

9393
evaluateCondition() {
94-
let value = CONDITIONS[this.el.data('if')?.trim()]
94+
let data_if = this.el.data('if')
95+
let value = data_if ? CONDITIONS[data_if.trim()] : null
9596
if (value) return { condition: value }
9697

9798
value = this.el.data('eq')

0 commit comments

Comments
 (0)