From 0ad8291ae778b80da49bc6ea263927c67e53d23d Mon Sep 17 00:00:00 2001 From: muxator Date: Wed, 28 Nov 2018 20:03:39 +0100 Subject: [PATCH] hooks: restore Internet Explorer 11 compatibility. Compatibility with IE11 regressed in 23eab79946e4 while working for #3488. That commit made use of modern js syntax, not supported by IE11. - Removed arrow functions, replaced with normal functions. - Removed the spread operator (<...iterable>) and the "new Set()" construct, replaced with _.uniq() At some point IE11 compatibility will be dropped. Ditching it now, for such a small gain, is not wise. Fixes #3500. --- src/static/js/pluginfw/hooks.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/static/js/pluginfw/hooks.js b/src/static/js/pluginfw/hooks.js index 81f56f965..3d19107d6 100644 --- a/src/static/js/pluginfw/hooks.js +++ b/src/static/js/pluginfw/hooks.js @@ -143,11 +143,11 @@ exports.clientPluginNames = function() { return []; } - var client_plugin_names = [...new Set( + var client_plugin_names = _.uniq( exports.plugins.parts - .filter(part => part.hasOwnProperty('client_hooks')) - .map(part => part['plugin']) - )]; + .filter(function(part) { return part.hasOwnProperty('client_hooks'); }) + .map(function(part) { return part['plugin']; }) + ); return client_plugin_names; }