diff --git a/js/src/modules/git-info.ts b/js/src/modules/git-info.ts index 8afbb00fa0..9c4f502efb 100644 --- a/js/src/modules/git-info.ts +++ b/js/src/modules/git-info.ts @@ -88,8 +88,9 @@ const GitInfo = { $('#maincontainer').append($(mainContainerDiv)); } + let upToDateMessage: Text | null = null; if (latest === current) { - versionInformationMessage = document.createTextNode(' (' + window.Messages.strUpToDate + ')'); + upToDateMessage = document.createTextNode(' (' + window.Messages.strUpToDate + ')'); } /* Remove extra whitespace */ @@ -100,7 +101,11 @@ const GitInfo = { const $liPmaVersion = $('#li_pma_version'); $liPmaVersion.find('span.latest').remove(); - $liPmaVersion.append($(versionInformationMessage)); + if (upToDateMessage !== null) { + $liPmaVersion.append($(upToDateMessage)); + } else { + $liPmaVersion.append($(versionInformationMessage)); + } } }, diff --git a/webpack.config.cjs b/webpack.config.cjs index 303146ebb9..8da0c323ff 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -21,7 +21,6 @@ const typeScriptErrorsToIgnore = [ 2469, // TS2469: The '+' operator cannot be applied to type 'symbol'. 2538, // TS2538: Type '%s' cannot be used as an index type. 2551, // TS2551: Property '%s' does not exist on type '%s'. Did you mean '%s'? - 2740, // TS2740: Type 'Text' is missing the following properties from type 'HTMLSpanElement': accessKey, accessKeyLabel, autocapitalize, dir, and 226 more. 2769, // TS2769: No overload matches this call. 5096, // TS5096: Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set. ];