From 01fa45fcd43f6bc66b3b744d4e232c7db66f680d Mon Sep 17 00:00:00 2001 From: pascal-kubrick Date: Wed, 30 Jan 2019 18:22:35 +0100 Subject: [PATCH] replaced spread operator in mdx-scopes with Object.assign (#279) --- packages/gatsby-plugin-mdx/loaders/mdx-scopes.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/gatsby-plugin-mdx/loaders/mdx-scopes.js b/packages/gatsby-plugin-mdx/loaders/mdx-scopes.js index 8ebdf47db45f7..7bb72c302a3a6 100644 --- a/packages/gatsby-plugin-mdx/loaders/mdx-scopes.js +++ b/packages/gatsby-plugin-mdx/loaders/mdx-scopes.js @@ -12,8 +12,8 @@ module.exports = () => { `const scope_${i} = require('${slash(path.join(abs, file))}').default;` ) .join("\n") + - `export default { - ${files.map((_, i) => "...scope_" + i).join(",\n")} -}` + `export default + Object.assign({}, ${files.map((_, i) => 'scope_' + i).join(',\n')} ) + ` ); };