From 78ea1f4fbc3e373ec67bec72554135a8abed55e1 Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Fri, 26 Apr 2024 15:44:54 +0200 Subject: [PATCH] Replace Object.assign with spread --- src/diagramElements/Section.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diagramElements/Section.tsx b/src/diagramElements/Section.tsx index b852bf1..f557761 100644 --- a/src/diagramElements/Section.tsx +++ b/src/diagramElements/Section.tsx @@ -26,7 +26,7 @@ export default function Section(props: SectionProps) { // If we're creating a section containing subsections, we don't need to create one. if (children.find((el) => el.type === Subsection)) { return Children.map(children, (child) => - cloneElement(child, Object.assign({ sectionCol: col }, props, child.props)), + cloneElement(child, { sectionCol: col, ...props, ...child.props }), ); }