Skip to content

Commit ec55b0a

Browse files
im-shivShivam Agarwal
andauthored
fix: Add null check for span element in radio button component (#1572)
Co-authored-by: Shivam Agarwal <shivama@adobe.com>
1 parent 158036b commit ec55b0a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui.frontend/src/view/FormOptionFieldBase.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ class FormOptionFieldBase extends FormFieldBase {
122122
} else {
123123
[...this.getOptions()].forEach((option, index) => {
124124
let span = option.querySelector('span');
125-
span.innerHTML = window.DOMPurify ? window.DOMPurify.sanitize(newEnumNames[index]) : newEnumNames[index];
125+
if(span) {
126+
span.innerHTML = window.DOMPurify ? window.DOMPurify.sanitize(newEnumNames[index]) : newEnumNames[index];
127+
}
126128
});
127129
}
128130
}

0 commit comments

Comments
 (0)