fix(user-list): validate before getting element attribute

Implements check for getAttribute type before calling it.
This commit is contained in:
Arthurk12 2024-04-16 11:22:20 -03:00 committed by prlanzarin
parent 356f6331c1
commit 41c58d2466

View File

@ -92,7 +92,7 @@ class UserParticipants extends Component {
selectEl(el) { selectEl(el) {
if (!el) return null; if (!el) return null;
if (el.getAttribute('tabindex')) return el?.focus(); if (typeof el.getAttribute === 'function' && el.getAttribute('tabindex')) return el?.focus();
this.selectEl(el?.firstChild); this.selectEl(el?.firstChild);
} }