Move `toolbar` declaration after the `:visible` check, like it was before [28019].

props kovshenin.
fixes #24859.
Built from https://develop.svn.wordpress.org/trunk@28046


git-svn-id: http://core.svn.wordpress.org/trunk@27876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2014-04-08 11:21:15 +00:00
parent fd0ae7e406
commit ad278c17e0
2 changed files with 4 additions and 3 deletions

View File

@ -4903,13 +4903,14 @@
scroll: function() { scroll: function() {
var view = this, var view = this,
toolbar = this.views.parent.toolbar; toolbar;
// @todo: is :visible still necessary?
if ( ! this.$el.is(':visible') || ! this.collection.hasMore() ) { if ( ! this.$el.is(':visible') || ! this.collection.hasMore() ) {
return; return;
} }
toolbar = this.views.parent.toolbar;
// Show the spinner only if we are close to the bottom. // Show the spinner only if we are close to the bottom.
if ( this.el.scrollHeight - ( this.el.scrollTop + this.el.clientHeight ) < this.el.clientHeight / 3 ) { if ( this.el.scrollHeight - ( this.el.scrollTop + this.el.clientHeight ) < this.el.clientHeight / 3 ) {
toolbar.get('spinner').show(); toolbar.get('spinner').show();

File diff suppressed because one or more lines are too long