Skip to content

fix(color): don't throw on empty computed color - #268

Open
Aaryan430 wants to merge 1 commit into
mainfrom
fix/AXE-3861-color-parse-empty-guard
Open

fix(color): don't throw on empty computed color#268
Aaryan430 wants to merge 1 commit into
mainfrom
fix/AXE-3861-color-parse-empty-guard

Conversation

@Aaryan430

@Aaryan430 Aaryan430 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

A detached/inert node (mutation re-scan, or a <template>/shadow subtree)
yields an empty computed *-color. colorjs throws "Empty color reference"
on it, and that uncaught abort takes down the whole in-page Type-B data
collection (and cascades to subsequent Workflow-Analyser steps).

Guard parseString: treat a blank/non-string value as transparent instead
of throwing. Genuinely-transparent colors (rgba(0,0,0,0)) still parse
normally; only empty (== a non-rendered node) is short-circuited, so no
element that a rule actually scores changes verdict.

Adds parseString specs for empty / whitespace / non-string input.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Aaryan430 Aaryan430 changed the title fix(color): don't throw on empty computed color (AXE-3861) fix(color): don't throw on empty computed color Jul 29, 2026
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.

2 participants