зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1624308 - Select top-level context if selected context is removed from the context list. r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D67865 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
702320920f
Коммит
09f8c97773
|
@ -34,7 +34,13 @@ function threadsReducer(state = initialReducerState, action) {
|
|||
const threads = state.threads.filter(
|
||||
thread => thread._targetFront !== action.target
|
||||
);
|
||||
return { ...state, threads };
|
||||
|
||||
let { selected } = state;
|
||||
if (selected._targetFront === action.target) {
|
||||
selected = null;
|
||||
}
|
||||
|
||||
return { ...state, threads, selected };
|
||||
}
|
||||
}
|
||||
return state;
|
||||
|
|
Загрузка…
Ссылка в новой задаче