Skip to content

Commit 78ea1f4

Browse files
committed
Replace Object.assign with spread
1 parent 5929af4 commit 78ea1f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diagramElements/Section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function Section(props: SectionProps) {
2626
// If we're creating a section containing subsections, we don't need to create one.
2727
if (children.find((el) => el.type === Subsection)) {
2828
return Children.map(children, (child) =>
29-
cloneElement(child, Object.assign({ sectionCol: col }, props, child.props)),
29+
cloneElement(child, { sectionCol: col, ...props, ...child.props }),
3030
);
3131
}
3232

0 commit comments

Comments
 (0)