Skip to content

Commit

Permalink
vsx-registry: fix the licenseUrl link
Browse files Browse the repository at this point in the history
- fixes the `licenseUrl` link for builtin and installed extensions.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
  • Loading branch information
vince-fugnitto committed Jun 26, 2020
1 parent bb85452 commit 3f42537
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/vsx-registry/src/browser/vsx-extension.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,16 @@ export class VSXExtension implements VSXExtensionData, TreeElement {
}

get licenseUrl(): string | undefined {
const plugin = this.plugin;
const licenseUrl = plugin && plugin.metadata.model.licenseUrl;
let licenseUrl = this.data['licenseUrl'];
if (licenseUrl) {
return new Endpoint({ path: licenseUrl }).getRestUrl().toString();
return licenseUrl;
} else {
const plugin = this.plugin;
licenseUrl = plugin && plugin.metadata.model.licenseUrl;
if (licenseUrl) {
return new Endpoint({ path: licenseUrl }).getRestUrl().toString();
}
}
return this.data['licenseUrl'];
}

get repository(): string | undefined {
Expand Down

0 comments on commit 3f42537

Please sign in to comment.