Skip to content

Commit

Permalink
Fixed querySelector() call. Now performed on document instead of elem…
Browse files Browse the repository at this point in the history
… which may be 'undefined'.
  • Loading branch information
fbrandel committed Dec 14, 2011
1 parent 14c0b16 commit f574ff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scrollfix.js
Expand Up @@ -11,7 +11,7 @@ var ScrollFix = function(elem) {
// Variables to track inputs
var startY = startTopScroll = deltaY = undefined,

elem = elem || elem.querySelector(elem);
elem = elem || document.querySelector(elem);

// If there is no element, then do nothing
if(!elem)
Expand Down

0 comments on commit f574ff6

Please sign in to comment.