Skip to content

Commit

Permalink
nonFungibles random sort
Browse files Browse the repository at this point in the history
  • Loading branch information
bokkypoobah committed Aug 6, 2024
1 parent 9405ef6 commit 9165f3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/nonFungibles.js
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ const NonFungibles = {
return results;
},
items() {
const results = ((store.getters['data/forceRefresh'] % 2) == 0 && this.randomise) ? [] : [];
const results = (store.getters['data/forceRefresh'] % 2) == 0 ? [] : [];
for (const [contract, data] of Object.entries(this.balances[this.chainId] || {})) {
if (data.type == "erc721" || data.type == "erc1155") {
for (const [tokenId, tokenData] of Object.entries(data.tokens)) {
Expand Down Expand Up @@ -713,7 +713,7 @@ const NonFungibles = {
return results;
},
filteredItems() {
const results = ((store.getters['data/forceRefresh'] % 2) == 0 && this.randomise) ? [] : [];
const results = (store.getters['data/forceRefresh'] % 2) == 0 ? [] : [];
let regex = null;
if (this.settings.filter != null && this.settings.filter.length > 0) {
try {
Expand Down Expand Up @@ -827,7 +827,7 @@ const NonFungibles = {
return results;
},
filteredSortedItems() {
const results = this.filteredItems;
const results = this.randomise ? this.filteredItems : this.filteredItems;
if (this.settings.sortOption == 'collectionasc') {
results.sort((a, b) => {
let compare = ('' + a.collection).localeCompare(b.collection);
Expand Down

0 comments on commit 9165f3a

Please sign in to comment.