Skip to content

Commit

Permalink
Check for window
Browse files Browse the repository at this point in the history
  • Loading branch information
patik committed Aug 2, 2015
1 parent 8197225 commit 1d4623e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions withinviewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
right: function _isWithin_right () {
var containerWidth;

if (canUseWindowDimensions) {
if (canUseWindowDimensions || config.container !== window) {
containerWidth = config.container.innerWidth;
}
else {
Expand All @@ -101,7 +101,7 @@
bottom: function _isWithin_bottom () {
var containerHeight;

if (canUseWindowDimensions) {
if (canUseWindowDimensions || config.container !== window) {
containerHeight = config.container.innerHeight;
}
else {
Expand Down

0 comments on commit 1d4623e

Please sign in to comment.