Skip to content

Commit

Permalink
🥅 Guard duplicated nav in portfolio
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Sep 11, 2024
1 parent f269065 commit bfdb215
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/mixins/portfolio.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,15 +507,19 @@ export const createPortfolioMixin = ({

const newQuery = {};

if (!queryTab || !tabOptions[queryTab] || this.currentTab !== tab) {
if (
queryTab !== tab &&
(!queryTab || !tabOptions[queryTab] || this.currentTab !== tab)
) {
newQuery.tab = tab;
type = NFT_TYPE_FILTER_OPTIONS.ALL;
}

if (
!queryType ||
!NFT_TYPE_FILTER_OPTIONS[queryType] ||
this.nftTypeFilter !== type
queryType !== type &&
(!queryType ||
!NFT_TYPE_FILTER_OPTIONS[queryType] ||
this.nftTypeFilter !== type)
) {
newQuery.type =
type === NFT_TYPE_FILTER_OPTIONS.ALL ? undefined : type.toLowerCase();
Expand Down

0 comments on commit bfdb215

Please sign in to comment.