summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/commons/polyfills/custom_event.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/commons/polyfills/custom_event.js')
-rw-r--r--app/assets/javascripts/commons/polyfills/custom_event.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/commons/polyfills/custom_event.js b/app/assets/javascripts/commons/polyfills/custom_event.js
index 8fd41fdd8dc..db51ade61ae 100644
--- a/app/assets/javascripts/commons/polyfills/custom_event.js
+++ b/app/assets/javascripts/commons/polyfills/custom_event.js
@@ -1,11 +1,12 @@
if (typeof window.CustomEvent !== 'function') {
window.CustomEvent = function CustomEvent(event, params) {
const evt = document.createEvent('CustomEvent');
- const evtParams = Object.assign({}, params, {
+ const evtParams = {
bubbles: false,
cancelable: false,
detail: undefined,
- });
+ ...params,
+ };
evt.initCustomEvent(event, evtParams.bubbles, evtParams.cancelable, evtParams.detail);
return evt;
};