Skip to content

Fix battery data sorting to avoid mutating state#1156

Merged
1Blademaster merged 2 commits into
mainfrom
1155-bug-crash-on-dashboard
Apr 10, 2026
Merged

Fix battery data sorting to avoid mutating state#1156
1Blademaster merged 2 commits into
mainfrom
1155-bug-crash-on-dashboard

Conversation

@1Blademaster

Copy link
Copy Markdown
Member

No description provided.

@1Blademaster 1Blademaster linked an issue Apr 10, 2026 that may be closed by this pull request
Copilot AI review requested due to automatic review settings April 10, 2026 19:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the selectBatteryData selector to avoid mutating Redux state while sorting battery data.

Changes:

  • Replace in-place .sort() on state.batteryData with sorting a copied array via spread ([...state.batteryData]).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gcs/src/redux/slices/droneInfoSlice.js Outdated
@1Blademaster
1Blademaster merged commit 78dbf55 into main Apr 10, 2026
5 checks passed
@1Blademaster
1Blademaster deleted the 1155-bug-crash-on-dashboard branch April 10, 2026 19:55
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.

[BUG] Crash on dashboard

3 participants