mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Avoid JS errors after [29057]. This is not how _.debounce() works.
See #24716. git-svn-id: https://develop.svn.wordpress.org/trunk@29071 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5b6340a221
commit
e8ce4559ed
@ -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();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user