From 787df16a4839f5aa0b471441c369408bddbf68f1 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Thu, 20 Oct 2022 20:40:28 -0700 Subject: [PATCH] Don't make network calls without a token --- background.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/background.js b/background.js index de5fc60..6b70db1 100644 --- a/background.js +++ b/background.js @@ -95,6 +95,10 @@ async function handleChangeInt(e) { const cfg = await browser.storage.sync.get(); + if (!cfg.token) { + throw 'missing token'; + } + const type = key.split('_', 1)[0]; await typeHandlers.get(type)(cfg, task);