Skip to content

Commit

Permalink
valide URIs created via from, #121198
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed May 19, 2021
1 parent b1349b6 commit 825f6c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/base/common/uri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,15 @@ export class URI implements UriComponents {
}

static from(components: { scheme: string; authority?: string; path?: string; query?: string; fragment?: string }): URI {
return new Uri(
const result = new Uri(
components.scheme,
components.authority,
components.path,
components.query,
components.fragment,
);
_validateUri(result, true);
return result;
}

/**
Expand Down

0 comments on commit 825f6c7

Please sign in to comment.