mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
Removed some accidental globals
This commit is contained in:
parent
62e399ef2e
commit
b89d7d7eeb
|
@ -131,8 +131,8 @@ es.compareArrays = function( a, b, compareObjects ) {
|
|||
es.copyArray = function( source ) {
|
||||
var destination = [];
|
||||
for ( var i = 0; i < source.length; i++ ) {
|
||||
sourceValue = source[i];
|
||||
sourceType = typeof sourceValue;
|
||||
var sourceValue = source[i],
|
||||
sourceType = typeof sourceValue;
|
||||
if ( sourceType === 'string' || sourceType === 'number' ) {
|
||||
destination.push( sourceValue );
|
||||
} else if ( es.isPlainObject( sourceValue ) ) {
|
||||
|
@ -155,8 +155,8 @@ es.copyArray = function( source ) {
|
|||
es.copyObject = function( source ) {
|
||||
var destination = {};
|
||||
for ( var key in source ) {
|
||||
sourceValue = source[key];
|
||||
sourceType = typeof sourceValue;
|
||||
var sourceValue = source[key],
|
||||
sourceType = typeof sourceValue;
|
||||
if ( sourceType === 'string' || sourceType === 'number' ) {
|
||||
destination[key] = sourceValue;
|
||||
} else if ( es.isPlainObject( 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