Don't infinitescroll undefined

This commit is contained in:
Raphael Sofaer 2011-05-02 15:28:42 -07:00
parent 2abb592833
commit 83a3655bfe

View file

@ -29,9 +29,11 @@
};
InfiniteScroll.prototype.initialize = function(){
$('#main_stream').infinitescroll(this.options(), function() {
Diaspora.widgets.publish("stream/scrolled");
});
if($('#main_stream').length !== 0){
$('#main_stream').infinitescroll(this.options(), function() {
Diaspora.widgets.publish("stream/scrolled");
});
}
};
InfiniteScroll.prototype.start = function() {