mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Temporary fix for transact method to accept array of transactions.
This commit is contained in:
parent
7da531b59e
commit
8fece3a241
|
@ -120,6 +120,14 @@ es.SurfaceModel.prototype.pushSelection = function( selection ) {
|
|||
* (such as when replacing - delete, then insert)
|
||||
*/
|
||||
es.SurfaceModel.prototype.transact = function( transaction, isPartial ) {
|
||||
|
||||
if(es.isArray(transaction)) {
|
||||
for( var i = 0; i < transaction.length; i++ ) {
|
||||
this.transact( transaction[i] );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// console.log( 'tx:' + $.map( transaction.getOperations(), function(tx) { return tx.type; } ).join(",")
|
||||
// + ' isPartial:' + isPartial );
|
||||
this.doc.commit( transaction );
|
||||
|
|
Loading…
Reference in a new issue