Skip to content

Bug: CSS Beautifier crashes on SelectorList AST traversal #22

Description

@omartuhintvs

Problem

In src/utils/cssProcessor.ts, the CSS beautifier attempts to traverse the AST prelude children using prelude.children?.map(...).join or similar. However, certain prelude structures (like SelectorList) do not expose children as direct arrays or map-safe properties, causing crashes like children?.map(...).join is not a function or writing incorrect output formats.

Suggestion

Verify prelude node types or check if .toArray() is required on the csso AST structures before mapping them.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions