mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-19 16:01:24 +00:00
fix(nuxt): skip deep merge in dev mode for prototype keys (#31205)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
4d258e2b10
commit
903597a48d
@ -35,6 +35,7 @@ function deepDelete (obj: any, newObj: any) {
|
||||
|
||||
function deepAssign (obj: any, newObj: any) {
|
||||
for (const key in newObj) {
|
||||
if (key === '__proto__' || key === 'constructor') { continue }
|
||||
const val = newObj[key]
|
||||
if (isPojoOrArray(val)) {
|
||||
const defaultVal = Array.isArray(val) ? [] : {}
|
||||
|
Loading…
Reference in New Issue
Block a user