From 0ae427060faa2cf186722680fc03ffc893ef6383 Mon Sep 17 00:00:00 2001 From: Daniel Huigens Date: Tue, 1 May 2018 16:54:11 +0200 Subject: [PATCH] Add Object.assign polyfill --- src/polyfills.js | 3 +++ src/worker/worker.js | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/polyfills.js b/src/polyfills.js index 3c46bb4d..77947cb6 100644 --- a/src/polyfills.js +++ b/src/polyfills.js @@ -27,3 +27,6 @@ if (typeof String.prototype.repeat === 'undefined') { if (typeof Symbol === 'undefined') { require('core-js/fn/symbol'); } +if (typeof Object.assign === 'undefined') { + require('core-js/fn/object/assign'); +} diff --git a/src/worker/worker.js b/src/worker/worker.js index 576f06c0..99422df6 100644 --- a/src/worker/worker.js +++ b/src/worker/worker.js @@ -86,7 +86,9 @@ self.onmessage = function(event) { * @param {Object} config The openpgp configuration */ function configure(config) { - Object.assign(openpgp.config, config); + Object.keys(config).forEach(function(key) { + openpgp.config[key] = config[key]; + }); } /**