diff --git a/package.json b/package.json index 40bc320..d7003db 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "module": "dist/idiomorph.esm.js", "unpkg": "dist/idiomorph.min.js", "scripts": { - "test": "mocha-chrome test/index.html", + "test": "mocha-chrome test/index.html --chrome-flags '[\"--allow-file-access-from-files\"]'", "amd": "(echo \"define(() => {\n\" && cat src/idiomorph.js && echo \"\nreturn Idiomorph});\") > dist/idiomorph.amd.js", "cjs": "(cat src/idiomorph.js && echo \"\nmodule.exports = Idiomorph;\") > dist/idiomorph.cjs.js", "esm": "(cat src/idiomorph.js && echo \"\nexport {Idiomorph};\") > dist/idiomorph.esm.js", diff --git a/src/idiomorph.js b/src/idiomorph.js index a142bd5..1ac7b6d 100644 --- a/src/idiomorph.js +++ b/src/idiomorph.js @@ -672,10 +672,10 @@ var Idiomorph = (function () { Object.assign(finalConfig, config); // copy callbacks into final config (do this to deep merge the callbacks) - Object.assign(finalConfig.callbacks, config.callbacks); + finalConfig.callbacks = Object.assign({}, defaults.callbacks, config.callbacks); // copy head config into final config (do this to deep merge the head) - Object.assign(finalConfig.head, config.head); + finalConfig.head = Object.assign({}, defaults.head, config.head); return finalConfig; }