r103412 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103411‎ | r103412 | r103413 >
Date:23:32, 16 November 2011
Author:tparscal
Status:ok
Tags:
Comment:
Removed some accidental globals
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/es.js (modified) (history)
  • /trunk/extensions/VisualEditor/tests/es/es.DocumentModel.test.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/tests/es/es.DocumentModel.test.js
@@ -19,8 +19,8 @@
2020 console.log( 'mismatched content lengths', a[i], b[i] );
2121 return false;
2222 }
23 - aIsBranch = typeof a[i].getChildren === 'function';
24 - bIsBranch = typeof b[i].getChildren === 'function';
 23+ var aIsBranch = typeof a[i].getChildren === 'function';
 24+ var bIsBranch = typeof b[i].getChildren === 'function';
2525 if ( aIsBranch !== bIsBranch ) {
2626 return false;
2727 }
Index: trunk/extensions/VisualEditor/modules/es/es.js
@@ -131,8 +131,8 @@
132132 es.copyArray = function( source ) {
133133 var destination = [];
134134 for ( var i = 0; i < source.length; i++ ) {
135 - sourceValue = source[i];
136 - sourceType = typeof sourceValue;
 135+ var sourceValue = source[i],
 136+ sourceType = typeof sourceValue;
137137 if ( sourceType === 'string' || sourceType === 'number' ) {
138138 destination.push( sourceValue );
139139 } else if ( es.isPlainObject( sourceValue ) ) {
@@ -155,8 +155,8 @@
156156 es.copyObject = function( source ) {
157157 var destination = {};
158158 for ( var key in source ) {
159 - sourceValue = source[key];
160 - sourceType = typeof sourceValue;
 159+ var sourceValue = source[key],
 160+ sourceType = typeof sourceValue;
161161 if ( sourceType === 'string' || sourceType === 'number' ) {
162162 destination[key] = sourceValue;
163163 } else if ( es.isPlainObject( sourceValue ) ) {

Status & tagging log