mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 01:45:53 +00:00
fix(nuxt): handle arrays correctly in updateAppConfig
(#26949)
This commit is contained in:
parent
72c3cbe12a
commit
62030cad96
@ -27,7 +27,8 @@ function deepAssign (obj: any, newObj: any) {
|
||||
for (const key in newObj) {
|
||||
const val = newObj[key]
|
||||
if (val !== null && typeof val === 'object') {
|
||||
obj[key] = obj[key] || {}
|
||||
const defaultVal = Array.isArray(val) ? [] : {}
|
||||
obj[key] = obj[key] || defaultVal
|
||||
deepAssign(obj[key], val)
|
||||
} else {
|
||||
obj[key] = val
|
||||
|
Loading…
Reference in New Issue
Block a user