Skip to content

Commit 6c1fd9c

Browse files
committed
Fix autoselecting the current window's instance
1 parent bc4baef commit 6c1fd9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/middlewares/panelSync.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LIFTED_ACTION, SELECT_INSTANCE } from 'remotedev-app/lib/constants/actionTypes';
1+
import { LIFTED_ACTION, UPDATE_STATE, SELECT_INSTANCE } from 'remotedev-app/lib/constants/actionTypes';
22
import { getActiveInstance } from 'remotedev-app/lib/reducers/instances';
33

44
function panelDispatcher(bgConnection) {
@@ -7,7 +7,7 @@ function panelDispatcher(bgConnection) {
77

88
return store => next => action => {
99
const result = next(action);
10-
if (!autoselected) {
10+
if (!autoselected && action.type === UPDATE_STATE) {
1111
autoselected = true;
1212
const connections = store.getState()
1313
.instances.connections[tabId];

0 commit comments

Comments
 (0)