Skip to content

fix: return no sibling for detached selector nodes - #373

Open
Aschenbath wants to merge 1 commit into
postcss:mainfrom
Aschenbath:fix/50-selector-detached-siblings-20261125-42bb
Open

Aschenbath wants to merge 1 commit into
postcss:mainfrom
Aschenbath:fix/50-selector-detached-siblings-20261125-42bb

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

Calling next() or prev() on a newly constructed or removed node currently throws while dereferencing its missing parent. Return undefined when the node has no siblings.

The regression checks both detached cases and preserves normal sibling traversal before and after removing the middle node.

Validation: the new regression fails on the unmodified baseline; npm test passes (lint, declaration type checks, and full tests with coverage thresholds). Formatting checks pass for the changed files.

AI assistance: implemented and tested with OpenAI Codex.

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