Refactor: Improve error handling

pull/4827/head
navedqb 2023-11-16 00:00:43 +05:30 committed by GitHub
parent ae90cc0e34
commit 8764814a19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ const FocusTrap = BaseFocusTrap.extend('focustrap', {
: DomHandler.getFirstFocusableElement(el, this.getComputedSelector(el.$_pfocustrap_focusableselector))
: DomHandler.getFirstFocusableElement(_el);
return ObjectUtils.isNotEmpty(focusableElement) ? focusableElement : _el.nextSibling ? findNextFocusableElement(_el.nextSibling) : null;
return ObjectUtils.isNotEmpty(focusableElement) ? focusableElement : _el.nextSibling && findNextFocusableElement(_el.nextSibling);
};
DomHandler.focus(findNextFocusableElement(mutation.nextSibling));