Fix Background File Scaffold
Pre-release
Pre-release
Fixes a minor bug in a scaffolded background.js file, where the incorrect message listener would be used in the event the user scaffolded the app with both the background and popup options selected.
This only fixes new scaffolds, for existing projects who are trying to continue to use the default background script listener, just change the first line of your src/background.js
to this:
browser.runtime.onMessage.addListener(function (request, sender, sendResponse) {