From e352a3a878e703d48d6fb1091cf804f594b1b83c Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Mon, 16 Sep 2024 11:42:06 +0100 Subject: eslint: Prefer const in mediawiki.api Change-Id: Id1ec60db0489dc9b082ed164e98b0a2a46f56054 --- resources/src/mediawiki.api/parse.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'resources/src/mediawiki.api/parse.js') diff --git a/resources/src/mediawiki.api/parse.js b/resources/src/mediawiki.api/parse.js index 617e499b59a3..2f0a0881a77c 100644 --- a/resources/src/mediawiki.api/parse.js +++ b/resources/src/mediawiki.api/parse.js @@ -11,15 +11,15 @@ * @return {jQuery.Promise} Promise that resolves with the parsed HTML of `wikitext` */ parse: function ( content, additionalParams ) { - let apiPromise, - config = Object.assign( { - formatversion: 2, - action: 'parse', - // Minimize the JSON we get back, there is no way to access anything else anyway - prop: 'text', - contentmodel: 'wikitext' - }, additionalParams ); + const config = Object.assign( { + formatversion: 2, + action: 'parse', + // Minimize the JSON we get back, there is no way to access anything else anyway + prop: 'text', + contentmodel: 'wikitext' + }, additionalParams ); + let apiPromise; if ( mw.Title && content instanceof mw.Title ) { // Parse existing page config.page = content.getPrefixedDb(); -- cgit v1.2.3