Skip to content

Fix propName error in normalizeProps when props array contains non-empty string values#154

Open
MatrixNeoKozak wants to merge 1 commit into
styled-components:masterfrom
MatrixNeoKozak:scout-improvement-1780257051605
Open

Fix propName error in normalizeProps when props array contains non-empty string values#154
MatrixNeoKozak wants to merge 1 commit into
styled-components:masterfrom
MatrixNeoKozak:scout-improvement-1780257051605

Conversation

@MatrixNeoKozak

Copy link
Copy Markdown

The normalizeProps function incorrectly uses zipObject with only keys, resulting in prop values being undefined for all props passed as arrays. This causes runtime errors when props are expected to have default values or types. The fix uses Array.reduce to properly create an object with keys mapped to empty objects (the Vue convention for minimal prop validation). Also removes lodash.zipobject dependency entirely.

@changeset-bot

changeset-bot Bot commented May 31, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4694085

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant