Skip to content

Commit 73a2da4

Browse files
committed
Sort connected browsers without profiles by ID instead of label
- sort alphabetically only those with profile name, others should be sorted by the order of connecting └── apps └── editor └── src └── services ├── websocket-manager.ts └── websocket-server-process.ts
1 parent 5d0e267 commit 73a2da4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/editor/src/services/websocket-manager.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ export class WebSocketManager {
303303
.sort((a, b) => {
304304
if (a._has_profile && !b._has_profile) return -1
305305
if (!a._has_profile && b._has_profile) return 1
306-
return a.label.localeCompare(b.label)
306+
if (a._has_profile && b._has_profile) {
307+
return a.label.localeCompare(b.label)
308+
}
309+
return a.id - b.id
307310
})
308311
.map((item) => ({
309312
label: item.label,

0 commit comments

Comments
 (0)