mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 03:08:42 +00:00
Fix standard problem when writing backward loops
This commit is contained in:
parent
a0acc98bcb
commit
18b97268fc
|
@ -78,7 +78,7 @@ es.DocumentModel.operations = ( function() {
|
|||
// 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] );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue