Fixing the hiding of tabs #167
This commit is contained in:
parent
f8fd316e56
commit
43570c74d5
1 changed files with 5 additions and 2 deletions
7
index.js
7
index.js
|
@ -232,11 +232,14 @@ const ContainerService = {
|
||||||
_closeTabs(tabsToClose) {
|
_closeTabs(tabsToClose) {
|
||||||
// We create a new tab only if the current operation closes all the
|
// We create a new tab only if the current operation closes all the
|
||||||
// existing ones.
|
// existing ones.
|
||||||
|
let promise;
|
||||||
if (tabs.length !== tabsToClose.length) {
|
if (tabs.length !== tabsToClose.length) {
|
||||||
return Promise.resolve(null);
|
promise = Promise.resolve(null);
|
||||||
|
} else {
|
||||||
|
promise = this.openTab({});
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.openTab({}).then(() => {
|
return promise.then(() => {
|
||||||
for (let tab of tabsToClose) { // eslint-disable-line prefer-const
|
for (let tab of tabsToClose) { // eslint-disable-line prefer-const
|
||||||
tab.close();
|
tab.close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue