From f99bd11d0525c2b28628f292d708a51136748cc2 Mon Sep 17 00:00:00 2001 From: maikirakiwi Date: Mon, 17 Oct 2022 00:27:20 +0000 Subject: [PATCH] chore: Prettified Code [ci skip] --- src/main/base/utils.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/base/utils.ts b/src/main/base/utils.ts index 7773cfb7..bca5ae00 100644 --- a/src/main/base/utils.ts +++ b/src/main/base/utils.ts @@ -84,20 +84,17 @@ export class utils { * @param url {string} URL param * @param opts {object} Other options */ - static readonly _mirror: boolean = this.getStoreValue("advanced.experiments").includes('cider_mirror') ? true : false; + static readonly _mirror: boolean = this.getStoreValue("advanced.experiments").includes("cider_mirror") ? true : false; static fetch(url: string, opts = {}) { if (this._mirror === true) { if (url.includes("api.github.com/")) { return fetch(url.replace("api.github.com/", "mirror.api.cider.sh/v2/api/"), opts); - } - else if (url.includes("raw.githubusercontent.com/")) { + } else if (url.includes("raw.githubusercontent.com/")) { return fetch(url.replace("raw.githubusercontent.com/", "mirror.api.cider.sh/v2/raw/"), opts); - } - else { + } else { return fetch(url, opts); } - } - else { + } else { return fetch(url, opts); } }