Skip to content

Commit 188bc0d

Browse files
fix(web): order preview webviews with a plain string comparison
Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent 23cdaeb commit 188bc0d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/web/src/browser/ElectronBrowserHost.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ export function ElectronBrowserHost() {
4949
: [];
5050
});
5151
// Electron destroys a moved webview's guest, so the render order must not follow the server's
52-
// updatedAt order.
52+
// updatedAt order. Any fixed order works; this one is not a display order.
5353
const sessions = activeSessions.toSorted((left, right) =>
54-
left.runtimeTabId.localeCompare(right.runtimeTabId),
54+
left.runtimeTabId < right.runtimeTabId ? -1 : left.runtimeTabId > right.runtimeTabId ? 1 : 0,
5555
);
5656

5757
useEffect(() => {

0 commit comments

Comments
 (0)