From 1a5b349021c8f68b0cea811bd8ce90caf2412b1c Mon Sep 17 00:00:00 2001 From: jwbth <33615628+jwbth@users.noreply.github.com> Date: Sat, 27 Feb 2021 19:19:30 +0300 Subject: [PATCH] Make sure newest revision is newer than current in updateChecker Theoretically, the API result of a parse request could be outdated compared to the API result of an edit request returning the ID of a revision just created. --- src/js/updateChecker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/updateChecker.js b/src/js/updateChecker.js index ef2e4128e..223bedf93 100644 --- a/src/js/updateChecker.js +++ b/src/js/updateChecker.js @@ -95,7 +95,7 @@ async function checkForUpdates() { }, true); const currentRevisionId = mw.config.get('wgRevisionId'); - if (revisions.length && revisions[0].revid !== (lastCheckedRevisionId || currentRevisionId)) { + if (revisions.length && revisions[0].revid > (lastCheckedRevisionId || currentRevisionId)) { const { revisionId, comments, sections } = await updateChecker.processPage(); lastCheckedRevisionId = revisionId;