Skip to content

Commit

Permalink
Fix race condition when progressively skips document.body
Browse files Browse the repository at this point in the history
  • Loading branch information
thinker3197 committed Aug 8, 2017
1 parent 23b5d9a commit 8fca6dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/progressively.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": "progressively",
"version": "1.1.3",
"version": "1.1.4",
"description": "A JavaScript library to load images progressively",
"main": "dist/progressively.min.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/progressively.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
}

el = el.parentNode
} while (el !== document.body)
} while (el !== document.body && el !== document)

return top <= document.documentElement.clientHeight
}
Expand Down

0 comments on commit 8fca6dd

Please sign in to comment.