Skip to content

fix(nuxt): updateAppConfig does not convert arrays into objects#26949

Merged
danielroe merged 1 commit intonuxt:mainfrom
bubblesortt:fix/update-app-config
Apr 26, 2024
Merged

fix(nuxt): updateAppConfig does not convert arrays into objects#26949
danielroe merged 1 commit intonuxt:mainfrom
bubblesortt:fix/update-app-config

Conversation

@bubblesortt
Copy link
Copy Markdown
Contributor

🔗 Linked issue

resolves #25715

📚 Description

When I try to update the appConfig using updateAppConfig and add a new property with an array value, I get an object instead of an array.
Example:

defineAppConfig({
  foo: bar 
})

updateAppConfig({
  test: [1,2]
})

Expected config:

{ 
  foo:bar,
  test: [1,2] 
}

But got:

{ 
  foo:bar, 
  test: { 
    '0': 1,
    '1': 2
  }
}

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Copy Markdown
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistancies between defineAppConfig and updateAppConfig with how they handle arrays.

2 participants