Skip to content

fix: add missing break in playerCinemaModeButton case in core.js - #4417

Merged
hkzo merged 1 commit into
code-charity:masterfrom
hkzo:fix/expected-break-before-case
Oct 25, 2026
Merged

hkzo merged 1 commit into
code-charity:masterfrom
hkzo:fix/expected-break-before-case

Conversation

@hkzo

@hkzo hkzo commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

The case 'playerCinemaModeButton' in core.js was missing a break statement. This caused an accidental fall-through to the subsequent case 'playerRepeatButton', which, while currently guarded by an if condition, poses a risk for future maintenance and potential bugs.

Changes

  • Added a missing break; statement to case 'playerCinemaModeButton' in js&css/web-accessible/core.js.

Why

In the current implementation, the fall-through does not cause immediate functional issues because the next case (playerRepeatButton) is guarded by an if statement. However, leaving missing break statements makes it difficult for maintainers to distinguish between "intentional fall-through" (used as a technique) and "accidental fall-through" (a bug). This increases the risk of regression if future logic changes are made to the subsequent cases without adding appropriate guards.

Testing

  • Verified the fix via code review to ensure the break statement is correctly placed.
  • Confirmed no functional regression through manual testing; the behavior remains identical for all current settings.
  • Verified JavaScript syntax and git diff --check passed.

Notes

I used AI assistance to help draft/translate this description.

@hkzo
hkzo force-pushed the fix/expected-break-before-case branch from c560f05 to 3e2988b Compare October 24, 2026 23:04
@hkzo
hkzo merged commit 6d85ec5 into code-charity:master Oct 25, 2026
1 check passed
@hkzo
hkzo deleted the fix/expected-break-before-case branch October 25, 2026 06:16
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.

1 participant