Skip to content

styleq: <cssAtom> typeof undefined is not "string" or "null". #452

@edkimmel

Description

@edkimmel

Describe the issue

I recently updated from RSD 0.33 to 0.55 and started encountering this error.

Returning undefined for a property in an inline style function now causes this error. I believe these values were previously ignored / stripped by RSD.

Expected behavior

If this is an intentional change, I would expect the typescript types for this function to disallow undefined values.

Steps to reproduce

const styles = css.create({
  gap: (gap?: number) => ({
    rowGap: gap, // An undefined gap will result in styleq: rowGap-abcdef typeof undefined is not "string" or "null".
  }),
})

Test case

No response

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions