Skip to content

Commit 3d7d4df

Browse files
committed
fix: uncaught error on failure to connect to update service
1 parent 67c091b commit 3d7d4df

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 2.1.4 | 2022-06-10
4+
5+
- Fix uncaught error when failing to connect to the extension service
6+
37
### 2.1.3 | 2022-03-04
48

59
- Support arm64 builds on Linux

lib/request.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ export async function getJSON<T>(api: string): Promise<T> {
3636
}
3737
});
3838

39-
res.on('error', err => {
40-
reject(err);
41-
});
42-
});
39+
res.on('error', reject);
40+
}).on('error', reject);
4341
});
4442
}

0 commit comments

Comments
 (0)