Skip to content

Commit fe970d2

Browse files
committed
🐞 Bug Fix | Unwanted Error throw
"Image unable to load" error triggered without reason
1 parent 0173a51 commit fe970d2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const getAsciiImage = (imageSource, config) => {
4444

4545
resolve(_getAsciiFromGrayScaleArray(grayScaleArray, width));
4646
}
47-
image.onerror = reject(new Error("Unable to load image"));
47+
image.onerror = () => reject(new Error("Unable to load image"));
4848
image.src = imageSource;
4949
});
5050
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "get-ascii-image",
3-
"version": "1.0.2",
3+
"version": "1.1.0",
44
"description": "Package to convert image to ascii characters",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)