Skip to content

Token.prototype.toString does not play nicely with Object.freeze(Object.prototype) #2

@jcranmer

Description

@jcranmer

A brief discussion with some ES committee people indicates that this is intentional. The solution is to use Object.defineProperty instead of a direct assignment. (Or assigning the literal .prototype directly).

I haven't investigated ES6 classes yet, so it's possible that switching to an ES6 class framework would make this work as well.

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