1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-27 23:28:38 +02:00

Desktop: Enable proxy support when fetching list of available plugins (#6907)

This commit is contained in:
Self Not Found
2022-10-16 05:21:06 +08:00
committed by GitHub
parent 0fe34d5178
commit fa67b7193c

View File

@ -30,7 +30,7 @@ const findWorkingGitHubUrl = async (defaultContentUrl: string): Promise<string>
for (const mirrorUrl of mirrorUrls) {
try {
// We try to fetch .gitignore, which is smaller than the whole manifest
await fetch(`${mirrorUrl}/.gitignore`);
await shim.fetch(`${mirrorUrl}/.gitignore`);
} catch (error) {
logger.info(`findWorkingMirror: Could not connect to ${mirrorUrl}:`, error);
continue;
@ -121,7 +121,7 @@ export default class RepositoryApi {
if (this.isLocalRepo) return;
try {
const response = await fetch(`${this.githubApiUrl}/releases`);
const response = await shim.fetch(`${this.githubApiUrl}/releases`);
const releases = await response.json();
if (!releases.length) throw new Error('No release was found');
this.release_ = releases[0];