Skip to content

String with only numbers is erroneously parsed as integer #8

@eslachance

Description

@eslachance

Hello Ryan!

I'm making a web component that displays information about a Discord ID, meaning someone could use <discord-user user-id="210246661446959104" /> and it would display its username and more information. Unfortunately, due to this line ( https://github.com/ryansolid/component-register/blob/master/src/utils.ts#L118 ) the Discord ID gets converted to a number which breaks it because that converts it to 210246661446959100.
image

In my humble opinion, automatic parsing should not be done on incoming argument values, as is made evident here.

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