From 09f6ad6edfd16141125f1722bb0f89c9f9918ee2 Mon Sep 17 00:00:00 2001 From: BreakingBread0 <49913490+BreakingBread0@users.noreply.github.com> Date: Fri, 12 Jan 2024 18:02:47 +0100 Subject: [PATCH] Fix for #6373 (TS5 compile error) --- src/js/utils/merge/merge.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/utils/merge/merge.ts b/src/js/utils/merge/merge.ts index 88e80a8..b2f3528 100644 --- a/src/js/utils/merge/merge.ts +++ b/src/js/utils/merge/merge.ts @@ -36,7 +36,7 @@ export function merge( object: T, source: U forOwn( source, ( value, key ) => { if ( Array.isArray( value ) ) { - merged[ key ] = value.slice(); + merged[ key ] = (value as []).slice(); } else if ( isObject( value ) ) { merged[ key ] = merge( isObject( merged[ key ] ) ? merged[ key ] : {}, value ); } else {