From 085ab53f88422694113b318f8c55ed8a01ca6aad Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Sun, 1 Oct 2023 21:18:08 +0200 Subject: [PATCH] use object spread instead `Object#assign` Update index.tsx --- src/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index e6ec72c..b2b913d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -78,11 +78,7 @@ export function MDXRemote({ // if we're ready to render, we can assemble the component tree and let React do its thing // first we set up the scope which has to include the mdx custom // create element function as well as any components we're using - const fullScope = Object.assign( - { opts: { ...mdx, ...jsxRuntime } }, - { frontmatter }, - scope - ) + const fullScope = { opts: { ...mdx, ...jsxRuntime }, frontmatter, ...scope } const keys = Object.keys(fullScope) const values = Object.values(fullScope)