Don't make network calls without a token
This commit is contained in:
@@ -95,6 +95,10 @@ async function handleChangeInt(e) {
|
|||||||
|
|
||||||
const cfg = await browser.storage.sync.get();
|
const cfg = await browser.storage.sync.get();
|
||||||
|
|
||||||
|
if (!cfg.token) {
|
||||||
|
throw 'missing token';
|
||||||
|
}
|
||||||
|
|
||||||
const type = key.split('_', 1)[0];
|
const type = key.split('_', 1)[0];
|
||||||
await typeHandlers.get(type)(cfg, task);
|
await typeHandlers.get(type)(cfg, task);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user