Skip to content

Commit 958519a

Browse files
committed
Added handling for missing cpr in MitidChildrenSelectAjaxBehaviour
1 parent ce88ed2 commit 958519a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

modules/os2forms_nemid/src/Element/MitidChildrenSelectAjaxBehaviour.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public static function mitidChildrenSelectAjax(array &$form, FormStateInterface
5252
$webform = $webformSubmission->getWebform();
5353
$elementsFlattened = $webform->getElementsInitializedAndFlattened();
5454

55+
if (!$cprLookupResult->isSuccessful()) {
56+
return $response;
57+
}
58+
5559
foreach ($elementsFlattened as $flattenedElement) {
5660
if (isset($flattenedElement['#type'])) {
5761
$parents = $flattenedElement['#webform_parents'];

0 commit comments

Comments
 (0)