Skip to content

Add null check for cssNode in stylesheets processor#44

Open
FDiskas wants to merge 1 commit into
Poimen:mainfrom
FDiskas:patch-2
Open

Add null check for cssNode in stylesheets processor#44
FDiskas wants to merge 1 commit into
Poimen:mainfrom
FDiskas:patch-2

Conversation

@FDiskas
Copy link
Copy Markdown

@FDiskas FDiskas commented Apr 3, 2026

Add null check for cssNode to prevent errors.

potentially fixes #43

What the patch does

  • Adds a defensive null check before rewriting style text inside the plugin transform.
  • If no style node is found, the plugin returns the original source text instead of attempting to access a missing property.

In practice, this prevents the runtime error:

  • Cannot read properties of undefined (reading text)

Add null check for cssNode to prevent errors.
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.

plugin broken for stencil/core >= 4.39.0

1 participant