hooks: restore Internet Explorer 11 compatibility.
Compatibility with IE11 regressed in 23eab79946
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.
pull/3526/head
parent
fe20ffa202
commit
0ad8291ae7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue