r103864 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103863‎ | r103864 | r103865 >
Date:23:10, 21 November 2011
Author:inez
Status:deferred
Tags:
Comment:
States is an array of array of transaction, so one more iteration is needed.
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/models/es.HistoryModel.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/models/es.HistoryModel.js
@@ -138,7 +138,9 @@
139139 if ( previousStateIndex > this.currentStateIndex ) {
140140 for ( var i = previousStateIndex; i > this.currentStateIndex; i-- ) {
141141 // Apply transaction to the document
142 - this.doc.rollback( this.states[i] );
 142+ for ( var j = this.states[i].length - 1; j >= 0; j-- ) {
 143+ this.doc.rollback( this.states[i][j] );
 144+ }
143145 // Emit an undo event with the state to be rolled back
144146 this.emit( 'undo', this.states[i] );
145147 }

Status & tagging log