-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Popup not opening #207
base: main
Are you sure you want to change the base?
Popup not opening #207
Conversation
src/js/background.js
Outdated
}); | ||
} | ||
} catch (error) { | ||
console.log(error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should leave the catch
empty to avoid debugging logs in the production version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm torn on this. I'd much rather have it logged as a proper console.error(). I feel that using an empty catch to silently suppress an error is not good practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The console.error instead of the console.log, was added to be more visible on the console, and also the part that verifies the 'firefox-preview' was removed.
@jhonatasrm Do you have step-to-reproduce instructions? I'm concerned that simply wrapping it in a try...catch results in silently failing to remove firefox-preview from the localStorage. We should probably find a solution that always successed to remove it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer a more generic approach, since it seems strange to have a rule exclusively for firefox-preview. Instead, maybe we should have a constant array of all valid products and then filter out any from the storage API that do not appear in the list.
I agree.. I don't know if we need that rule tbh, once he was removed right? |
Yes, in the issue #206. |
The verification for 'firefox-preview' has been removed, as discussed earlier. For some reason that part was checking if the chooseProduct contained the 'firefox-preview'. |
Requirement for Contributing a Pull Request
following:
(MPL 2.0).
with the new relevant code.
Identify the Bug
#206
Description of the Change
Was added try-catch when verifying the chosen product.
Alternate Designs
no
Possible Drawbacks
no