diff --git a/lib/static/modules/reducers/tree/index.js b/lib/static/modules/reducers/tree/index.js index e4296738d..5c39f554d 100644 --- a/lib/static/modules/reducers/tree/index.js +++ b/lib/static/modules/reducers/tree/index.js @@ -1,4 +1,4 @@ -import {findLast} from 'lodash'; +import {findLast, isEmpty} from 'lodash'; import {produce} from 'immer'; import actionNames from '../../action-names'; import { @@ -93,8 +93,11 @@ export default ((state, action) => { case actionNames.BROWSERS_SELECTED: { const {tree, view} = state; + const filteredBrowsers = isEmpty(view.filteredBrowsers) + ? state.browsers.map(({id}) => ({id, versions: []})) + : view.filteredBrowsers; - updateAllSuitesStatus(tree, view.filteredBrowsers, diff.tree); + updateAllSuitesStatus(tree, filteredBrowsers, diff.tree); calcBrowsersShowness({tree, view, diff: diff.tree}); calcSuitesShowness({tree, diff: diff.tree});