1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-14 18:27:44 +02:00

Fixed tests

Don't know how it ever worked
This commit is contained in:
Laurent Cozic 2023-10-21 17:00:01 +01:00
parent 8d20aa0bb8
commit 3fbdb8307c

View File

@ -72,8 +72,8 @@ export default class RepositoryApi {
// https://github.com/joplin/plugins
// https://api.github.com/repos/joplin/plugins/releases
this.githubApiUrl_ = this.baseUrl_.replace(/^(https:\/\/)(github\.com\/)(.*)$/, '$1api.$2repos/$3');
const defaultContentBaseUrl = `${this.baseUrl_.replace(/github\.com/, 'raw.githubusercontent.com')}/master`;
this.contentBaseUrl_ = await findWorkingGitHubUrl(defaultContentBaseUrl);
const defaultContentBaseUrl = this.isLocalRepo ? this.baseUrl_ : `${this.baseUrl_.replace(/github\.com/, 'raw.githubusercontent.com')}/master`;
this.contentBaseUrl_ = this.isLocalRepo ? defaultContentBaseUrl : await findWorkingGitHubUrl(defaultContentBaseUrl);
this.isUsingDefaultContentUrl_ = this.contentBaseUrl_ === defaultContentBaseUrl;