mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
fix closing tab containing multiple panes
This commit is contained in:
parent
cd655ad1e6
commit
97242c5d78
1 changed files with 3 additions and 1 deletions
|
|
@ -152,7 +152,9 @@ const replaceParent = (state, parent, child) => {
|
|||
|
||||
const removeGroup = (state, uid) => {
|
||||
const group = state.termGroups[uid];
|
||||
if (group.parentUid) {
|
||||
// when close tab with multiple panes, it remove group from parent to child. so maybe the parentUid exists but parent group have removed.
|
||||
// it's safe to remove the group.
|
||||
if (group.parentUid && state.termGroups[group.parentUid]) {
|
||||
const parent = state.termGroups[group.parentUid];
|
||||
const newChildren = parent.children.filter(childUid => childUid !== uid);
|
||||
if (newChildren.length === 1) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue