diff --git a/lib/static/modules/reducers/tree/index.js b/lib/static/modules/reducers/tree/index.js index 0398b2660..595601160 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 { @@ -43,8 +43,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});