Skip to content

fix: return empty array for empty string in list.split - #2121

Merged
ai merged 1 commit into
postcss:mainfrom
amir-rezaei:fix/list-split-empty-string-guard
Jul 29, 2026
Merged

fix: return empty array for empty string in list.split#2121
ai merged 1 commit into
postcss:mainfrom
amir-rezaei:fix/list-split-empty-string-guard

Conversation

@amir-rezaei

Copy link
Copy Markdown
Contributor

Description

This PR updates list.split in lib/list.js.

Details

  • Returns an empty array [] early when string is empty or falsy to prevent spurious empty element insertion when parsing empty CSS value strings.

@ai
ai merged commit 10edf0b into postcss:main Jul 29, 2026
10 checks passed
@ai

ai commented Jul 29, 2026

Copy link
Copy Markdown
Member

Thanks!

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.

3 participants