Fixing the hiding of tabs #167

This commit is contained in:
baku
2017-02-10 19:39:52 +01:00
parent f8fd316e56
commit 43570c74d5
+5 -2
View File
@@ -232,11 +232,14 @@ const ContainerService = {
_closeTabs(tabsToClose) {
// We create a new tab only if the current operation closes all the
// existing ones.
let promise;
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
tab.close();
}