File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 296296 }
297297
298298 const labelledBy = currentNode . getAttribute ( 'aria-labelledby' ) ;
299- if ( labelledBy && container . querySelector ( `#${ labelledBy } ` ) ?. innerText ?. includes ( text ) ) {
299+ const labelElement = labelledBy && container . querySelector ( `#${ labelledBy } ` ) ;
300+ if ( labelElement && labelElement . innerText && labelElement . innerText . includes ( text ) ) {
300301 elements . push ( currentNode ) ;
301302
302303 continue ;
361362 * @return {HTMLElement } Parent element.
362363 */
363364 var getParentElement = function ( element ) {
364- return element . parentElement ?? element . getRootNode ( ) ?. host ?? null ;
365+ return element . parentElement || ( element . getRootNode ( ) && element . getRootNode ( ) . host ) || null ;
365366 } ;
366367
367368 /**
438439 // may not work without doing this.
439440 const parentElement = getParentElement ( element ) ;
440441
441- if ( parentElement ? .matches ( 'ion-button, ion-back-button' ) ) {
442+ if ( parentElement && parentElement . matches ( 'ion-button, ion-back-button' ) ) {
442443 element = parentElement ;
443444 }
444445
You can’t perform that action at this time.
0 commit comments