Close the opened tabs when a container is deleted
This commit is contained in:
parent
4331a2612c
commit
702d5aba4c
1 changed files with 7 additions and 0 deletions
7
index.js
7
index.js
|
@ -454,6 +454,13 @@ const ContainerService = {
|
|||
if (!("userContextId" in args)) {
|
||||
return Promise.reject("removeIdentity must be called with userContextId argument.");
|
||||
}
|
||||
|
||||
for (let tab of tabs) { // eslint-disable-line prefer-const
|
||||
if (args.userContextId === this._getUserContextIdFromTab(tab)) {
|
||||
tab.close();
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.resolve(ContextualIdentityService.remove(args.userContextId));
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue