Skip to content

Not possible to set numeric keys, even with multiple numbers like "5.1.1", on an object #1042

Description

@BennyAlex

image

My keys have multiple numbers seperated by dot.

In this check:
image
the isNaN return false. We should only check for positive whole numbers here, all other numbers are not valid array indexes.

But I also wonder why its not allowed to set a numeric key in an object at all. Its not going against any JS rules. It should be possible.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions