Skip to content

Commit

Permalink
fix: Unable to find latest version on GitHub (#6822)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoikkuTo committed May 1, 2022
1 parent 2860d13 commit bfe29a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ten-dragons-rest.md
@@ -0,0 +1,5 @@
---
"electron-updater": patch
---

fix: Unable to find latest version on GitHub
2 changes: 1 addition & 1 deletion packages/electron-updater/src/providers/GitHubProvider.ts
Expand Up @@ -31,7 +31,7 @@ export abstract class BaseGitHubProvider<T extends UpdateInfo> extends Provider<
protected computeGithubBasePath(result: string): string {
// https://github.com/electron-userland/electron-builder/issues/1903#issuecomment-320881211
const host = this.options.host
return host !== null && host !== "github.com" && host !== "api.github.com" ? `/api/v3${result}` : result
return host && !["github.com", "api.github.com"].includes(host) ? `/api/v3${result}` : result
}
}

Expand Down

0 comments on commit bfe29a5

Please sign in to comment.