mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
fix(nuxt): support deep assign on empty object for app config (#10087)
This commit is contained in:
parent
ef39d2c9d9
commit
71a5727589
@ -26,6 +26,7 @@ function deepAssign (obj: any, newObj: any) {
|
|||||||
for (const key in newObj) {
|
for (const key in newObj) {
|
||||||
const val = newObj[key]
|
const val = newObj[key]
|
||||||
if (val !== null && typeof val === 'object') {
|
if (val !== null && typeof val === 'object') {
|
||||||
|
obj[key] = obj[key] || {}
|
||||||
deepAssign(obj[key], val)
|
deepAssign(obj[key], val)
|
||||||
} else {
|
} else {
|
||||||
obj[key] = val
|
obj[key] = val
|
||||||
|
Loading…
Reference in New Issue
Block a user