Skip to content

Fix the error prepuint throws #63

@papertigers

Description

@papertigers

I hit this twice with different projects passing a string instead of a number

Uncaught TypeError: object is not a function

FROM
prepuint (/opt/smartdc/portolan/node_modules/ctype/ctio.js:679:10)

There's a type when throwing the error which made the initial debugging kind of confusing.
https://github.com/rmustacc/node-ctype/blob/master/ctio.js#L679
throw (new (Error('cannot write a non-number as a number')));
We need to remove the extra parens after "new"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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