From c37c494a1ea53b45fd5810ab3076921a2eb126b9 Mon Sep 17 00:00:00 2001 From: Reda Al Sulais Date: Fri, 11 Aug 2023 19:54:37 +0300 Subject: [PATCH] Update assignWithDepth.ts --- packages/mermaid/src/assignWithDepth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mermaid/src/assignWithDepth.ts b/packages/mermaid/src/assignWithDepth.ts index 263b005bc5..831825779d 100644 --- a/packages/mermaid/src/assignWithDepth.ts +++ b/packages/mermaid/src/assignWithDepth.ts @@ -28,9 +28,9 @@ const assignWithDepth = ( dst: any, src: any, - { depth = 2, clobber = false }: { depth: number; clobber: boolean } = { depth: 2, clobber: false } + { depth = 2, clobber = false }: { depth?: number; clobber?: boolean } = {} ): any => { - const config = Object.assign({ depth, clobber }); + const config: { depth: number; clobber: boolean } = { depth, clobber }; if (Array.isArray(src) && !Array.isArray(dst)) { src.forEach((s) => assignWithDepth(dst, s, config)); return dst;