Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fluffy-steaks-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'remotedev-redux-devtools-extension': patch
---

Avoid auto-selecting instance with iFrames
11 changes: 10 additions & 1 deletion extension/src/window/store/instanceSelectorMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ function selectInstance(
) {
const instances = store.getState().instances;
if (instances.current === 'default') return;
const connections = instances.connections[tabId];

const connections = Object.entries(instances.connections).reduce<
(string | number)[]
>((acc, [key, connections]) => {
if (key.startsWith(String(tabId))) {
return [...acc, ...connections];
}
return acc;
}, []);

if (connections && connections.length === 1) {
next({ type: SELECT_INSTANCE, selected: connections[0] });
}
Expand Down