fix: prevent store mutation error by creating array copy before sorting

This commit is contained in:
Pulse Monitor
2025-09-08 21:50:02 +00:00
parent f3af1f7efa
commit a1a078dc26
@@ -29,8 +29,8 @@ export const DiskList: Component<DiskListProps> = (props) => {
);
}
// Sort by node and devPath
return disks.sort((a, b) => {
// Sort by node and devPath - create a copy to avoid mutating store
return [...disks].sort((a, b) => {
if (a.node !== b.node) return a.node.localeCompare(b.node);
return a.devPath.localeCompare(b.devPath);
});