Cast fallback revision_id to a number so it validates

EditAttemptStep requires an integer, and just getting the value of an
input is always a string.

Bug: T261664
Change-Id: I57e76857086474365124b5b016902211b0e63166
This commit is contained in:
David Lynch 2020-08-31 11:04:09 -05:00
parent 8366ebb517
commit 8cb67a83ea

View file

@ -151,7 +151,7 @@
page_title: mw.config.get( 'wgPageName' ),
page_ns: mw.config.get( 'wgNamespaceNumber' ),
// eslint-disable-next-line no-jquery/no-global-selector
revision_id: mw.config.get( 'wgRevisionId' ) || $( 'input[name=parentRevId]' ).val(),
revision_id: mw.config.get( 'wgRevisionId' ) || +$( 'input[name=parentRevId]' ).val(),
editing_session_id: editingSessionId,
page_token: mw.user.getPageviewToken(),
session_token: mw.user.sessionId(),