Fix undefined img bug

This commit is contained in:
Dennis Eichhorn 2017-07-19 12:28:37 +02:00 committed by GitHub
parent cfdcbd9a36
commit 8e22bde18e

View File

@ -107,7 +107,7 @@
const img = this.canvas.getAttribute('data-src'),
self = this;
if(typeof img !== 'undefined' && img.length > 0) {
if(img !== null && typeof img !== 'undefined' && img.length > 0) {
let imgObj = new Image();
imgObj.addEventListener('load', function() {