https://www.mediawiki.org/wiki/Special:Code/MediaWiki/102357
Revision: 102357 Author: inez Date: 2011-11-08 01:00:31 +0000 (Tue, 08 Nov 2011) Log Message: ----------- Fix standard problem when writing backward loops Modified Paths: -------------- trunk/extensions/VisualEditor/modules/es/models/es.DocumentModel.js Modified: trunk/extensions/VisualEditor/modules/es/models/es.DocumentModel.js =================================================================== --- trunk/extensions/VisualEditor/modules/es/models/es.DocumentModel.js 2011-11-08 00:59:55 UTC (rev 102356) +++ trunk/extensions/VisualEditor/modules/es/models/es.DocumentModel.js 2011-11-08 01:00:31 UTC (rev 102357) @@ -78,7 +78,7 @@ // Regenerate nodes for the data we've affected var newNodes = es.DocumentModel.createNodesFromData( newData ); // Insert new elements into the tree where the old ones used to be - for ( var i = newNodes.length; i >= 0; i-- ) { + for ( var i = newNodes.length - 1; i >= 0; i-- ) { parent.splice( index, 0, newNodes[i] ); } } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs