From 62e9a9400eaa99538dd0065e3ef7fb0328352e59 Mon Sep 17 00:00:00 2001 From: Antony Jones Date: Wed, 10 Feb 2021 11:35:18 +0000 Subject: [PATCH] Makes Pell work in Microsoft Edge Classic Using object rest destructuring requires pell to be pushed through babel for transpilation to older JS. Switching to `Object.assign` means that it will work in Edge Classic without transpilation. --- src/pell.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pell.js b/src/pell.js index c5a1bf2..1084108 100644 --- a/src/pell.js +++ b/src/pell.js @@ -103,13 +103,13 @@ export const init = settings => { ? ( settings.actions.map(action => { if (typeof action === 'string') return defaultActions[action] - else if (defaultActions[action.name]) return { ...defaultActions[action.name], ...action } + else if (defaultActions[action.name]) return Object.assign({}, defaultActions[action.name], action) return action }) ) : Object.keys(defaultActions).map(action => defaultActions[action]) - const classes = { ...defaultClasses, ...settings.classes } + const classes = Object.assign({}, defaultClasses, settings.classes) const defaultParagraphSeparator = settings[defaultParagraphSeparatorString] || 'div'