From ada3c4e18a28c880c37cb53290e1a6950d983975 Mon Sep 17 00:00:00 2001 From: David Keane Date: Wed, 10 Jun 2026 01:09:15 +0100 Subject: [PATCH] fix(v0.5.3-prep): async storage.onChanged listener (await fix) Previous commit (60331b8) added `await getQuickStations()` inside the chrome.storage.onChanged callback, but the callback arrow function was still synchronous. Node --check missed it (node parses the file but doesn't fully simulate Chrome's stricter module analysis); Chrome's parser caught it as 'Unexpected reserved word' at the await keyword. One-character fix: `(changes, area) =>` becomes `async (changes, area) =>`. Same pattern as the rest of the file (e.g. initThemeUI, the toggle handlers) which are already async. --- src/options/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options/options.js b/src/options/options.js index 2354b78..660bf24 100644 --- a/src/options/options.js +++ b/src/options/options.js @@ -111,7 +111,7 @@ async function init() { }); // Refresh stats live if storage changes from another surface - chrome.storage.onChanged.addListener((changes, area) => { + chrome.storage.onChanged.addListener(async (changes, area) => { if (area !== 'local') return; if (changes[THEME_KEY]) { const v = changes[THEME_KEY].newValue || THEME_DEFAULT;