Commit b43fdb83 authored by Jason Laster's avatar Jason Laster Committed by Jason Laster
Browse files

Bug 1520957 - [release 119] Fixes an issue where the selected tab is not...

Bug 1520957 - [release 119] Fixes an issue where the selected tab is not visible on refresh (#7747). r=dwalsh
parent df9378ce
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -6,12 +6,15 @@

import type { Action, ThunkArgs } from "./types";
import { closeTabsForMissingThreads } from "./tabs";
import { features } from "../utils/prefs";

export function updateWorkers() {
  return async function({ dispatch, getState, client }: ThunkArgs) {
    const workers = await client.fetchWorkers();
    dispatch(({ type: "SET_WORKERS", workers }: Action));

    if (features.windowlessWorkers) {
      dispatch(closeTabsForMissingThreads(workers));
    }
  };
}