mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-27 04:06:51 +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.
|
||||
*/
|
||||
function undoState( state ) {
|
||||
var hasTransaction = false;
|
||||
var hadTransaction = false;
|
||||
var i = state.length - 1;
|
||||
while ( i-- ) {
|
||||
if ( state[i] instanceof es.TransactionModel ) {
|
||||
hasTransaction = true;
|
||||
hadTransaction = true;
|
||||
this.doc.rollback( state[i] );
|
||||
}
|
||||
}
|
||||
this.emit( 'undo', state );
|
||||
return hasTransaction;
|
||||
return hadTransaction;
|
||||
}
|
||||
|
||||
while ( transactionsToUndo ) {
|
||||
|
|
Loading…
Reference in a new issue