Skip to content

Testing undefined message on library call #29

@JulianPB

Description

@JulianPB

Hi,

With the update to version 2.2.0 we had a new error being thrown without understanding the issue.

Turns out we were sending an undefined message in our call
md5(undefined)

But the first test in the library
if (message === 'undefined' || message === null) throw new Error('Illegal argument ' + message);
is not properly catching the error as message === 'undefined' won't actually catch undefined variables.

A quick fix would be message === undefined or typeof message === 'undefined' or anything of your convenience.

Thank you for your work,

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