hasTransaction -> hadTransaction

This commit is contained in:
Neil Kandalgaonkar 2011-12-01 19:08:18 +00:00
parent d82a706170
commit b7cc76acd8

View file

@ -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 ) {