From da4bdc68211a70a17cc475f0520d6e660af2c4cb Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 16 Sep 2022 12:40:14 +0300 Subject: [PATCH] API should return something --- background/uso-api.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/background/uso-api.js b/background/uso-api.js index ad30347c..3a6399d6 100644 --- a/background/uso-api.js +++ b/background/uso-api.js @@ -71,9 +71,10 @@ const usoApi = {}; return true; }; - function ping(id, resolve) { - return fetch(`${URLS.uso}styles/install/${id}?source=stylish-ch`) - .then(resolve); + async function ping(id, resolve) { + await fetch(`${URLS.uso}styles/install/${id}?source=stylish-ch`); + if (resolve) resolve(true); + return true; } function makeKey(key, {badKeys, newKeys}) {