File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,12 @@ const THEMES_DIRECTORY = path.join(CWD, 'src/themes');
3434 * Deep merges source object into target object.
3535 * Simple implementation for merging specs.
3636 */
37- function deepMerge ( target : any , source : any ) : any {
38- if ( typeof target !== 'object' || target === null ) {
39- return source ;
37+ function deepMerge ( target : object | null , source : object | null ) : Record < string , unknown > {
38+ if ( typeof source == 'object' && typeof target !== 'object' || target === null ) {
39+ return source as Record < string , unknown > ;
4040 }
41- if ( typeof source !== 'object' || source === null ) {
42- return target ; // source is not object, don't overwrite with primitive unless standard merge? valid for spec?
41+ if ( typeof target == 'object' && typeof source !== 'object' || source === null ) {
42+ return target as Record < string , unknown > ;
4343 }
4444
4545 const output = { ...target } ;
You can’t perform that action at this time.
0 commit comments