Skip to content

Commit

Permalink
fix: Do not fails if services weren't installed
Browse files Browse the repository at this point in the history
  • Loading branch information
CGNonofr committed Jul 8, 2022
1 parent 04c4fe8 commit 6485cc7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ let services: Services | undefined
export namespace Services {
export type Provider = () => Services
export const get: Provider = () => {
if (services == null) {
throw new Error('Services has not been installed')
}
return services
return services ?? {}
}
export function install (_services: Services): vscode.Disposable {
if (services != null) {
Expand Down

0 comments on commit 6485cc7

Please sign in to comment.