Skip to content

Conversation

@jayamrutiya
Copy link

Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added

Further information:

Overview

This PR fixes a SonarQube issue (javascript:S2201) where the return
value of Array.prototype.map() was ignored in the player pause logic.

Changes

  • Replaced .map() with a for...of loop for better readability.
  • Ensured player pause functionality remains unchanged.
  • Removed unnecessary return value creation to comply with Sonar rules.

Why

  • .map() is meant for transforming arrays, but the returned value was
    not being used.
  • Using for...of clarifies the intention (iteration for side effects).
  • Resolves Sonar warning S2201: Return values should not be ignored.

Testing

  • Verified that all players are paused correctly.
  • No change in functionality, only code quality improvement.

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