mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
editcheck: Remove try/catch around transaction squashing
According to T333710 we haven't seen an error in the last year. Change-Id: I7ee3447674cdda8a4350b6cf10d5d907c2162e2e
This commit is contained in:
parent
4cd67004de
commit
cf8a08f76c
|
@ -59,16 +59,7 @@ mw.editcheck.getModifiedRanges = function ( documentModel, coveredNodesOnly ) {
|
||||||
if ( !documentModel.completeHistory.getLength() ) {
|
if ( !documentModel.completeHistory.getLength() ) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
let operations;
|
const operations = documentModel.completeHistory.squash().transactions[ 0 ].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 ranges = [];
|
const ranges = [];
|
||||||
let offset = 0;
|
let offset = 0;
|
||||||
const endOffset = documentModel.getDocumentRange().end;
|
const endOffset = documentModel.getDocumentRange().end;
|
||||||
|
|
Loading…
Reference in a new issue