mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 14:06:52 +00:00
Merge "editcheck: Remove try/catch around transaction squashing"
This commit is contained in:
commit
3ffa8f92df
|
@ -59,16 +59,7 @@ mw.editcheck.getModifiedRanges = function ( documentModel, coveredNodesOnly ) {
|
|||
if ( !documentModel.completeHistory.getLength() ) {
|
||||
return [];
|
||||
}
|
||||
let operations;
|
||||
try {
|
||||
operations = documentModel.completeHistory.squash().transactions[ 0 ].operations;
|
||||
} catch ( err ) {
|
||||
// TransactionSquasher can sometimes throw errors; until T333710 is
|
||||
// fixed just count this as not needing a reference.
|
||||
mw.errorLogger.logError( err, 'error.visualeditor' );
|
||||
return [];
|
||||
}
|
||||
|
||||
const operations = documentModel.completeHistory.squash().transactions[ 0 ].operations;
|
||||
const ranges = [];
|
||||
let offset = 0;
|
||||
const endOffset = documentModel.getDocumentRange().end;
|
||||
|
|
Loading…
Reference in a new issue