mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Optimize ve.filterArray a bit
Change-Id: I8fc9c8d5f57a4af3b5421c65664351f21e488c53
This commit is contained in:
parent
d1a4b903df
commit
98a914e9fe
|
@ -243,7 +243,7 @@
|
|||
*/
|
||||
ve.filterArray = function ( array, callback, context ) {
|
||||
var i, len, value, result = [];
|
||||
if ( Array.prototype.filter ) {
|
||||
if ( array.filter ) {
|
||||
return array.filter( callback, context );
|
||||
} else {
|
||||
for ( i = 0, len = array.length; i < len; i++ ) {
|
||||
|
|
Loading…
Reference in a new issue