From cba55b93303ff6582fffc95173647c58cbca963d Mon Sep 17 00:00:00 2001 From: Catrope Date: Sun, 26 May 2013 14:34:47 +0200 Subject: [PATCH] Don't do evil shadowing of mw Having local variable called mw that shadows the global variable mw is evil. Rename it to mwAttr. Change-Id: I87bd3698c73608076424c10fdb0559dfdc3e3045 --- modules/ve/dm/nodes/ve.dm.MWReferenceNode.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ve/dm/nodes/ve.dm.MWReferenceNode.js b/modules/ve/dm/nodes/ve.dm.MWReferenceNode.js index c363521f87..54198ea1ff 100644 --- a/modules/ve/dm/nodes/ve.dm.MWReferenceNode.js +++ b/modules/ve/dm/nodes/ve.dm.MWReferenceNode.js @@ -57,7 +57,7 @@ ve.dm.MWReferenceNode.static.toDataElement = function ( domElements, converter ) }; ve.dm.MWReferenceNode.static.toDomElements = function ( dataElement, doc, converter ) { - var itemNodeHtml, mw, + var itemNodeHtml, mwAttr, span = doc.createElement( 'span' ), itemNodeWrapper = doc.createElement( 'div' ), itemNode = converter.internalList.getItemNode( dataElement.attributes.listIndex ), @@ -72,9 +72,9 @@ ve.dm.MWReferenceNode.static.toDomElements = function ( dataElement, doc, conver ), itemNodeHtml = $( itemNodeWrapper ).html(); - mw = ( dataElement.attributes && ve.copyObject( dataElement.attributes.mw ) ) || {}; - ve.setProp( mw, 'body', 'html', itemNodeHtml ); - span.setAttribute( 'data-mw', JSON.stringify( mw ) ); + mwAttr = ( dataElement.attributes && ve.copyObject( dataElement.attributes.mw ) ) || {}; + ve.setProp( mwAttr, 'body', 'html', itemNodeHtml ); + span.setAttribute( 'data-mw', JSON.stringify( mwAttr ) ); return [ span ]; };