Skip to content

Class names in n:class starting with a hyphen are compiled incorrectly #370

@zraly

Description

@zraly

Version: 3.0.18

Bug Description

n:class="$foo ? 'font-bold', -top-0.5" is incorrectly compiled to [$foo ? 'font-bold' : null, -'top-0.5'].
The problem is if the class name starts with a hyphen.

The error it produces is Unsupported operand types: string * int

Expected behavior

n:class="$foo ? 'font-bold', -top-0.5" is compiled to [$foo ? 'font-bold' : null, '-top-0.5']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions