looks-same
looks-same copied to clipboard
`looksSame` throws an error when an error is present using the readme code
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
});
This doesn't resolve the error, this just makes it not stop the script. Equal still comes out as undefined.
After some more fidgeting, I figured out the issue. looks-same only works on .png images.