link.prepend is not a function in older browsers

Seen in logstash for Chrome 50.
Icons are not essentially, so gracefully degrade in these browsers
to items without icons.

Change-Id: I083c87c9bf5f256c8bcd2893e251571b97440ce1
This commit is contained in:
Jon Robson 2022-10-06 11:11:14 -07:00 committed by Jdlrobson
parent 508d5fc548
commit 8a54c0841b

View file

@ -102,7 +102,8 @@ function addPortletLinkHandler( item, data ) {
} }
} }
if ( link && iconElement ) { // Check link.prepend exists for older browser since this is ES5 code
if ( link && iconElement && link.prepend ) {
link.prepend( iconElement ); link.prepend( iconElement );
} }