File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ export function activate(): void {
23
23
}
24
24
25
25
const uri = resolveURI ( editor . document . uri )
26
+ if ( ! uri ) {
27
+ return
28
+ }
26
29
27
30
const threads = await fetchDiscussionThreads ( {
28
31
first : 10000 ,
Original file line number Diff line number Diff line change 2
2
* Resolve a URI of the forms git://github.com/owner/repo?rev#path and file:///path to an absolute reference, using
3
3
* the given base (root) URI.
4
4
*/
5
- export function resolveURI ( uri : string ) : { repo : string ; rev : string ; path : string } {
5
+ export function resolveURI ( uri : string ) : { repo : string ; rev : string ; path : string } | null {
6
6
const url = new URL ( uri )
7
7
if ( url . protocol === 'git:' ) {
8
8
return {
@@ -11,5 +11,5 @@ export function resolveURI(uri: string): { repo: string; rev: string; path: stri
11
11
path : url . hash . slice ( 1 ) ,
12
12
}
13
13
}
14
- throw new Error ( `unrecognized URI: ${ JSON . stringify ( uri ) } (supported URI schemes: git)` )
14
+ return null
15
15
}
You can’t perform that action at this time.
0 commit comments