Skip to content

Commit

Permalink
FORDRIF-171: Prevented potential undefined index error
Browse files Browse the repository at this point in the history
  • Loading branch information
rimi-itk committed Sep 13, 2023
1 parent 8e96f99 commit 5dea999
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function os2forms_selvbetjening_form_alter(array &$form, FormStateInterface $for
function os2forms_selvbetjening_webform_element_alter(array &$element, FormStateInterface $form_state, array $context) {
// Add js-form-item class to webform_more element to expose them to form
// states (element conditions).
if ('webform_more' === $element['#type']) {
if ('webform_more' === ($element['#type'] ?? NULL)) {
$element['#attributes']['class'][] = 'js-form-item';
}
}

0 comments on commit 5dea999

Please sign in to comment.