Skip to content

looksSame throws an error when an error is present using the readme code #57

@vctr-dev

Description

@vctr-dev

looksSame throws an error when an error is present, using the readme code

looksSame('image1.png', 'image2.png', function(error, {equal}) {
    // equal will be true, if images looks the same
});

> TypeError: Cannot destructure property `equal` of 'undefined' or 'null'.

Should probably update the docs to set the default in the callback i.e.

looksSame('image1.png', 'image2.png', function(error, {equal} = {}) {
    // equal will be true, if images looks the same
});

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