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}) {