From 71a572758918179f6e9d2d35da7955c9d4e9dbb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Sat, 14 Jan 2023 00:28:07 +0100 Subject: [PATCH] fix(nuxt): support deep assign on empty object for app config (#10087) --- packages/nuxt/src/app/config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/nuxt/src/app/config.ts b/packages/nuxt/src/app/config.ts index 9c1c930d64..78fa433c8e 100644 --- a/packages/nuxt/src/app/config.ts +++ b/packages/nuxt/src/app/config.ts @@ -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