Avoid JS errors after [29057]. This is not how `_.debounce()` works.

See #24716.

Built from https://develop.svn.wordpress.org/trunk@29071


git-svn-id: http://core.svn.wordpress.org/trunk@28857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-07-10 18:03:15 +00:00
parent 6695de8b5b
commit 2af40744ec
2 changed files with 9 additions and 5 deletions

View File

@ -588,13 +588,17 @@
}
// The right arrow key
if ( event.keyCode === 39 ) {
if ( ! this.hasNext ) { return; }
_.debounce( this.nextMediaItem(), 250 );
if ( ! this.hasNext ) {
return;
}
this.nextMediaItem();
}
// The left arrow key
if ( event.keyCode === 37 ) {
if ( ! this.hasPrevious ) { return; }
_.debounce( this.previousMediaItem(), 250 );
if ( ! this.hasPrevious ) {
return;
}
this.previousMediaItem();
}
},

File diff suppressed because one or more lines are too long