Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Popup not opening #207

wants to merge 3 commits into from

Conversation

jhonatasrm
Copy link
Collaborator

Requirement for Contributing a Pull Request

  • Put an X between the brackets on this line if you have done all of the
    following:
    • You agree to license your code under the project's open source license
      (MPL 2.0).
    • Your branch is based off the current master.
    • You did not include merge commits in pull requests; include only commits
      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

});
}
} catch (error) {
console.log(error);
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

@dannycolin
Copy link
Collaborator

@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.

Copy link
Collaborator

@WesleyBranton WesleyBranton left a 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.

@jhonatasrm
Copy link
Collaborator Author

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?

@jhonatasrm
Copy link
Collaborator Author

@jhonatasrm Do you have step-to-reproduce instructions?

Yes, in the issue #206.

@jhonatasrm
Copy link
Collaborator Author

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'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants