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

Is the fall through essential here? #3

Open
adityashaw2 opened this issue Feb 9, 2023 · 3 comments
Open

Is the fall through essential here? #3

adityashaw2 opened this issue Feb 9, 2023 · 3 comments

Comments

@adityashaw2
Copy link

The following switch case has no break statement at the end.

https://github.com/domchristie/needles/blob/master/dist/needles-worker.js#L285-L286

    case 'set':
      this[event.data.key] = event.data.value; // <-- after this statement
    case 'record':

Is it intentional?

@domchristie
Copy link
Owner

@adityashaw2 good spot! I don't think this is intentional. Messages can only send one data.type so I don't think there's be any point to falling through. Feel free to open a pull request with the change.

@adityashaw2
Copy link
Author

@adityashaw2 good spot! I don't think this is intentional. Messages can only send one data.type so I don't think there's be any point to falling through. Feel free to open a pull request with the change.

Thanks for the quick reply! I'll open a PR by this weekend.

Adityashaw added a commit to Adityashaw/FindLUFS that referenced this issue Feb 16, 2023
@Adityashaw
Copy link

PR created.

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

No branches or pull requests

3 participants