From cf8a08f76ca7a68978dfea4a8975745208d1224d Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Tue, 1 Oct 2024 14:20:52 +0100 Subject: [PATCH] editcheck: Remove try/catch around transaction squashing According to T333710 we haven't seen an error in the last year. Change-Id: I7ee3447674cdda8a4350b6cf10d5d907c2162e2e --- editcheck/modules/init.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/editcheck/modules/init.js b/editcheck/modules/init.js index a6a820946f..c860a02183 100644 --- a/editcheck/modules/init.js +++ b/editcheck/modules/init.js @@ -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;