https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103412

Revision: 103412
Author:   tparscal
Date:     2011-11-16 23:32:57 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
Removed some accidental globals

Modified Paths:
--------------
    trunk/extensions/VisualEditor/modules/es/es.js
    trunk/extensions/VisualEditor/tests/es/es.DocumentModel.test.js

Modified: trunk/extensions/VisualEditor/modules/es/es.js
===================================================================
--- trunk/extensions/VisualEditor/modules/es/es.js      2011-11-16 23:31:20 UTC 
(rev 103411)
+++ trunk/extensions/VisualEditor/modules/es/es.js      2011-11-16 23:32:57 UTC 
(rev 103412)
@@ -131,8 +131,8 @@
 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.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 ) ) {

Modified: trunk/extensions/VisualEditor/tests/es/es.DocumentModel.test.js
===================================================================
--- trunk/extensions/VisualEditor/tests/es/es.DocumentModel.test.js     
2011-11-16 23:31:20 UTC (rev 103411)
+++ trunk/extensions/VisualEditor/tests/es/es.DocumentModel.test.js     
2011-11-16 23:32:57 UTC (rev 103412)
@@ -19,8 +19,8 @@
                                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;
                        }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to