Removed some accidental globals

This commit is contained in:
Trevor Parscal 2011-11-16 23:32:57 +00:00
parent 62e399ef2e
commit b89d7d7eeb
2 changed files with 6 additions and 6 deletions

View file

@ -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 ) ) {

View file

@ -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;
}