mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
app: close window when last tab is exited (#263)
This commit is contained in:
parent
fa4033937e
commit
1214d26323
1 changed files with 4 additions and 7 deletions
|
|
@ -103,15 +103,12 @@ export function userExitSession (uid) {
|
|||
type: SESSION_USER_EXIT,
|
||||
uid,
|
||||
effect () {
|
||||
const { sessions } = getState().sessions;
|
||||
if (sessions[uid]) {
|
||||
rpc.emit('exit', { uid });
|
||||
const sessions = keys(getState().sessions.sessions);
|
||||
if (!sessions.length) {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue