Skip to content

Conversation

KernCheh
Copy link
Contributor

@KernCheh KernCheh commented Jul 8, 2020

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!

Also use the triple equal `===` comparison operator
@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jul 8, 2020
@fluttergithubbot
Copy link
Contributor

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.

@googlebot
Copy link

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 @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

return self.skipWaiting();
}
if (event.message = 'downloadOffline') {
Copy link
Contributor Author

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

@KernCheh
Copy link
Contributor Author

KernCheh commented Jul 8, 2020

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Jul 8, 2020
Copy link
Contributor

@jonahwilliams jonahwilliams left a 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

@fluttergithubbot fluttergithubbot merged commit 5f49654 into flutter:master Jul 8, 2020
@KernCheh KernCheh deleted the patch-1 branch July 8, 2020 17:24
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants