Skip to content

Commit 60b354b

Browse files
committed
fix error in the case of undefined width attribute
1 parent 6f214c0 commit 60b354b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/jquery.lazyloadxt.picture.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@
5050
$img = $('<img>').appendTo($el);
5151
}
5252

53-
$img
54-
.attr('width', $el.attr('width'))
55-
.attr('height', $el.attr('height'));
53+
$img.attr('width', $el.attr('width'));
54+
$img.attr('height', $el.attr('height'));
5655
})
5756
// show picture
5857
.on('lazyshow', 'picture', function (e, $el) {

0 commit comments

Comments
 (0)