I noticed that when I use the shortcut key, it's not using my line height preference on page load. Turns out it was using the default preference because storage wasn't working correctly. the culprit is that await getPrefs() is just sending a message back to background script. and if it was called within the background script, if was effectively a background to background message, and both this and this says that's not allowed
solution: detect if its a bg script and get storage directly.
I noticed that when I use the shortcut key, it's not using my line height preference on page load. Turns out it was using the default preference because storage wasn't working correctly. the culprit is that
await getPrefs()
is just sending a message back to background script. and if it was called within the background script, if was effectively a background to background message, and both this and this says that's not allowedsolution: detect if its a bg script and get storage directly.