Skip to content

Commit

Permalink
Merge branch 'hotfix/8.7.1' into support/8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
verlok committed Mar 29, 2018
2 parents 441aba5 + e464d8a commit d5bf275
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/lazyload.es2015.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const setData = (element, attribute, value) => {

const setSourcesForPicture = function (element, srcsetDataAttribute) {
const parent = element.parentNode;
if (parent.tagName !== "PICTURE") {
if (parent && parent.tagName !== "PICTURE") {
return;
}
for (let i = 0; i < parent.children.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion dist/lazyload.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol

var setSourcesForPicture = function setSourcesForPicture(element, srcsetDataAttribute) {
var parent = element.parentNode;
if (parent.tagName !== "PICTURE") {
if (parent && parent.tagName !== "PICTURE") {
return;
}
for (var i = 0; i < parent.children.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion dist/lazyload.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vanilla-lazyload",
"version": "8.7.0",
"version": "8.7.1",
"description": "A fast, lightweight script to load images as they enter the viewport. SEO friendly, it supports responsive images (both srcset + sizes and picture) and progressive JPEG",
"main": "dist/lazyload.min.js",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/lazyload.setSources.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {getData} from "./lazyload.data";

const setSourcesForPicture = function (element, srcsetDataAttribute) {
const parent = element.parentNode;
if (parent.tagName !== "PICTURE") {
if (parent && parent.tagName !== "PICTURE") {
return;
}
for (let i = 0; i < parent.children.length; i++) {
Expand Down

0 comments on commit d5bf275

Please sign in to comment.