We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6512665 commit cde8dbdCopy full SHA for cde8dbd
extension/src/window/store/instanceSelectorMiddleware.ts
@@ -13,7 +13,16 @@ function selectInstance(
13
) {
14
const instances = store.getState().instances;
15
if (instances.current === 'default') return;
16
- const connections = instances.connections[tabId];
+
17
+ const connections = Object.entries(instances.connections).reduce<
18
+ (string | number)[]
19
+ >((acc, [key, connections]) => {
20
+ if (key.startsWith(String(tabId))) {
21
+ return [...acc, ...connections];
22
+ }
23
+ return acc;
24
+ }, []);
25
26
if (connections && connections.length === 1) {
27
next({ type: SELECT_INSTANCE, selected: connections[0] });
28
}
0 commit comments