Skip to content

Commit

Permalink
refactor: merge deep options when create fetch (#1)
Browse files Browse the repository at this point in the history
* refactor: merge deep options when create fetch
  • Loading branch information
ErikPham authored Apr 4, 2024
1 parent d2e2655 commit 048086c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/utils/option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
GoogleFontsFetchOptions,
ResolvedGoogleFontsFetchOptions,
} from '../types'
import { extend } from './common'
import { extend, mergeDeep } from './common'

/**
* Normalize Google Font Helper options
Expand Down Expand Up @@ -39,11 +39,10 @@ export function normalizeOptions(options?: GoogleFontsFetchOptions): ResolvedGoo
outDir: './output/fonts',
},
}
return extend(
{},
return mergeDeep(
base,
options || {},
)
) as ResolvedGoogleFontsFetchOptions
}

/**
Expand Down

0 comments on commit 048086c

Please sign in to comment.