-
Notifications
You must be signed in to change notification settings - Fork 29.3k
Issue with comparison operator in generated service worker #61066
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
Conversation
Also use the triple equal `===` comparison operator
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
return self.skipWaiting(); | ||
} | ||
if (event.message = 'downloadOffline') { |
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.
This should not be =
I believe
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
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.
LGTM
Thanks for the fix
Description
There is an bug I believe with the comparison operator in the generated service worker for Flutter web. When the service worker registration receives a message event, it always triggers the
downloadOffline
case due to the assignment operator being used in place of the comparison operator.I really appreciate the detailed guidance on contributing guidelines, however, I apologize in advance that I might not have the bandwidth to look into much follow-ups on this. The motivation of putting in this PR is to highlight the issue :)
Please feel free to merge if this is a bug, or create a separate contribution if there are any legal issues, many thanks!