From 8a54c0841b0b9d437328ec5cbca800c08cc54847 Mon Sep 17 00:00:00 2001 From: Jon Robson Date: Thu, 6 Oct 2022 11:11:14 -0700 Subject: [PATCH] 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 --- resources/skins.vector.js/dropdownMenus.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/skins.vector.js/dropdownMenus.js b/resources/skins.vector.js/dropdownMenus.js index d031a912..37ffcfcb 100644 --- a/resources/skins.vector.js/dropdownMenus.js +++ b/resources/skins.vector.js/dropdownMenus.js @@ -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 ); }