mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
Removed some accidental globals
This commit is contained in:
parent
62e399ef2e
commit
b89d7d7eeb
|
@ -131,7 +131,7 @@ es.compareArrays = function( a, b, compareObjects ) {
|
|||
es.copyArray = function( source ) {
|
||||
var destination = [];
|
||||
for ( var i = 0; i < source.length; i++ ) {
|
||||
sourceValue = source[i];
|
||||
var sourceValue = source[i],
|
||||
sourceType = typeof sourceValue;
|
||||
if ( sourceType === 'string' || sourceType === 'number' ) {
|
||||
destination.push( sourceValue );
|
||||
|
@ -155,7 +155,7 @@ es.copyArray = function( source ) {
|
|||
es.copyObject = function( source ) {
|
||||
var destination = {};
|
||||
for ( var key in source ) {
|
||||
sourceValue = source[key];
|
||||
var sourceValue = source[key],
|
||||
sourceType = typeof sourceValue;
|
||||
if ( sourceType === 'string' || sourceType === 'number' ) {
|
||||
destination[key] = sourceValue;
|
||||
|
|
|
@ -19,8 +19,8 @@ test( 'es.DocumentModel.getChildren', 1, function() {
|
|||
console.log( 'mismatched content lengths', a[i], b[i] );
|
||||
return false;
|
||||
}
|
||||
aIsBranch = typeof a[i].getChildren === 'function';
|
||||
bIsBranch = typeof b[i].getChildren === 'function';
|
||||
var aIsBranch = typeof a[i].getChildren === 'function';
|
||||
var bIsBranch = typeof b[i].getChildren === 'function';
|
||||
if ( aIsBranch !== bIsBranch ) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue