Fix missing callback for case of unsupported image types.
This commit is contained in:
parent
481e0452e8
commit
bd7e01926b
@ -341,6 +341,8 @@ QR =
|
|||||||
QR.error "#{file.name}: Image too small (image: #{height}x#{width}px, min: #{QR.min_height}x#{QR.min_width}px)"
|
QR.error "#{file.name}: Image too small (image: #{height}x#{width}px, min: #{QR.min_height}x#{QR.min_width}px)"
|
||||||
pass = false
|
pass = false
|
||||||
cb pass, img
|
cb pass, img
|
||||||
|
img.onerror = ->
|
||||||
|
cb false, null
|
||||||
img.src = URL.createObjectURL file
|
img.src = URL.createObjectURL file
|
||||||
else if /^video\//.test file.type
|
else if /^video\//.test file.type
|
||||||
video = $.el 'video'
|
video = $.el 'video'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user