Skip to content

Commit bb2fc94

Browse files
fix _subscribeSelectedTabsHistory bug
1 parent 39629a0 commit bb2fc94

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils/api/api.factory.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ const _apiProps = {
3333
return this;
3434
},
3535
_subscribeSelectedTabsHistory: function () {
36-
this.on('onChange', ({ isSwitched, oldState }) => {
37-
isSwitched && this.activedTabsHistory.add(oldState.selectedTabID);
36+
this.on('onChange', ({ currentData, perviousData }) => {
37+
const isSwitched = perviousData.selectedTabID !== currentData.selectedTabID;
38+
isSwitched && this.activedTabsHistory.add(perviousData.selectedTabID);
3839
});
3940
return this;
4041
},

0 commit comments

Comments
 (0)