Skip to content

Commit c7f52ba

Browse files
committed
Assert 200 status instead of simply ok
1 parent 140a0c5 commit c7f52ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/compass/src/main/auto-update-manager.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,9 @@ class CompassAutoUpdateManager {
635635
try {
636636
const response = await this.fetch((await this.getUpdateCheckURL()).href);
637637

638-
639-
assert(response.ok);
638+
if (response.status !== 200) {
639+
return { available: false };
640+
}
640641

641642
try {
642643
const json = await response.json();

0 commit comments

Comments
 (0)