diff options
Diffstat (limited to 'src/vs/workbench/contrib/extensions/browser/extensionEditor.ts')
-rw-r--r-- | src/vs/workbench/contrib/extensions/browser/extensionEditor.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index cb560efaaa3..8e2d1a5badd 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -71,6 +71,7 @@ import { MarkdownString } from 'vs/base/common/htmlContent'; import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite'; import { ViewContainerLocation } from 'vs/workbench/common/views'; import { IExtensionGalleryService, IGalleryExtension } from 'vs/platform/extensionManagement/common/extensionManagement'; +import semver = require('vs/base/common/semver/semver'); class NavBar extends Disposable { @@ -183,10 +184,10 @@ class VersionWidget extends ExtensionWithDifferentGalleryVersionWidget { this.render(); } render(): void { - if (!this.extension) { + if (!this.extension || !semver.valid(this.extension.version)) { return; } - this.element.textContent = `v${this.gallery ? this.gallery.version : this.extension.version}`; + this.element.textContent = `v${this.gallery?.version ?? this.extension.version}`; } } |