Skip to content

Commit 7482037

Browse files
committed
Return false if file parameter is not a File, Blob or String.
1 parent 271ca6a commit 7482037

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

load-image.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* JavaScript Load Image 1.4
2+
* JavaScript Load Image 1.4.1
33
* https://github.com/blueimp/JavaScript-Load-Image
44
*
55
* Copyright 2011, Sebastian Tschan
@@ -47,7 +47,7 @@
4747
img.crossOrigin = options.crossOrigin;
4848
}
4949
} else {
50-
return img;
50+
return false;
5151
}
5252
if (url) {
5353
img.src = url;

load-image.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blueimp-load-image",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"title": "JavaScript Load Image",
55
"description": "JavaScript Load Image is a function to load images provided as File or Blob objects or via URL. It returns an optionally scaled HTML img or canvas element.",
66
"keywords": [

0 commit comments

Comments
 (0)