fix(nuxt): support deep assign on empty object for app config (#10087)

This commit is contained in:
Sébastien Chopin 2023-01-14 00:28:07 +01:00 committed by GitHub
parent ef39d2c9d9
commit 71a5727589
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,6 +26,7 @@ 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] || {}
deepAssign(obj[key], val)
} else {
obj[key] = val