Skip to content

Commit 4e03a3a

Browse files
update HistoryActiveTabs : remove
popLastTabID and check id before add it into tabIDs
1 parent f1325c9 commit 4e03a3a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/utils/api/activedTabsHistory.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
const HistoryActiveTabs = function () {
22
this.tabsId = [];
33
};
4-
HistoryActiveTabs.prototype.popLastTabID = function () {
5-
return this.tabsId.pop();
6-
};
74
HistoryActiveTabs.prototype.reset = function () {
85
this.tabsId = [];
96
};
107
HistoryActiveTabs.prototype.add = function (id) {
11-
this.tabsId.push(id);
8+
if (id) this.tabsId.push(id);
129
};
1310
HistoryActiveTabs.prototype.remove = function (id) {
1411
const tabIDs = this.tabsId;

0 commit comments

Comments
 (0)