mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
hasTransaction -> hadTransaction
This commit is contained in:
parent
d82a706170
commit
b7cc76acd8
|
@ -123,16 +123,16 @@ es.SurfaceModel.prototype.undo = function( transactionsToUndo ) {
|
||||||
* @return {Boolean} whether visible change was undone.
|
* @return {Boolean} whether visible change was undone.
|
||||||
*/
|
*/
|
||||||
function undoState( state ) {
|
function undoState( state ) {
|
||||||
var hasTransaction = false;
|
var hadTransaction = false;
|
||||||
var i = state.length - 1;
|
var i = state.length - 1;
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
if ( state[i] instanceof es.TransactionModel ) {
|
if ( state[i] instanceof es.TransactionModel ) {
|
||||||
hasTransaction = true;
|
hadTransaction = true;
|
||||||
this.doc.rollback( state[i] );
|
this.doc.rollback( state[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.emit( 'undo', state );
|
this.emit( 'undo', state );
|
||||||
return hasTransaction;
|
return hadTransaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ( transactionsToUndo ) {
|
while ( transactionsToUndo ) {
|
||||||
|
|
Loading…
Reference in a new issue