Skip to content

Commit

Permalink
fix: don't mutate Default in-place
Browse files Browse the repository at this point in the history
Close #716
  • Loading branch information
frostming authored Dec 23, 2023
1 parent 60e0e7e commit bc6d1f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/artalk/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Defaults from './defaults'
*/
export function handelCustomConf(customConf: Partial<ArtalkConfig>): ArtalkConfig {
// 合并默认配置
const conf: ArtalkConfig = Utils.mergeDeep(Defaults, customConf)
const conf: ArtalkConfig = Utils.mergeDeep({ ...Defaults }, customConf)

// TODO the type of el options may HTMLElement, use it directly instead of from mergeDeep
if (customConf.el) conf.el = customConf.el
Expand Down

0 comments on commit bc6d1f0

Please sign in to comment.