Skip to content

Commit

Permalink
fix: check null for isCustomChannel in GitHubProvider.ts #7665 (#7666)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethjray authored Jul 20, 2023
1 parent e2d81b6 commit 441da40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/smart-balloons-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"electron-updater": patch
---

fix: check null for `isCustomChannel` in GitHubProvider.ts
2 changes: 1 addition & 1 deletion packages/electron-updater/src/providers/GitHubProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class GitHubProvider extends BaseGitHubProvider<GithubUpdateInfo> {
const hrefChannel = (semver.prerelease(hrefTag)?.[0] as string) || null

const shouldFetchVersion = !currentChannel || ["alpha", "beta"].includes(currentChannel)
const isCustomChannel = !["alpha", "beta"].includes(String(hrefChannel))
const isCustomChannel = hrefChannel !== null && !["alpha", "beta"].includes(String(hrefChannel))
// Allow moving from alpha to beta but not down
const channelMismatch = currentChannel === "beta" && hrefChannel === "alpha"

Expand Down

0 comments on commit 441da40

Please sign in to comment.