Skip to content

Commit

Permalink
Make sure newest revision is newer than current in updateChecker
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jwbth committed Feb 27, 2021
1 parent ea0749c commit 1a5b349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/updateChecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1a5b349

Please sign in to comment.