mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-04-25 15:58:11 -05:00
updated attack search to reflect change in db
This commit is contained in:
parent
1334bd65ff
commit
81a4e0dd8d
File diff suppressed because one or more lines are too long
|
|
@ -159,13 +159,13 @@ export default class CollectionHome extends React.Component {
|
||||||
if (stones.noElements.checked) {
|
if (stones.noElements.checked) {
|
||||||
creatureResults = creatureResults.where((obj) => {return (obj.gsx$elements == '');});
|
creatureResults = creatureResults.where((obj) => {return (obj.gsx$elements == '');});
|
||||||
attackResults = attackResults.where(
|
attackResults = attackResults.where(
|
||||||
(obj) => {return (obj.gsx$fire == (0||'') );}
|
(obj) => {return (obj.gsx$fire == ('') );}
|
||||||
).where(
|
).where(
|
||||||
(obj) => {return (obj.gsx$air == (0||'') );}
|
(obj) => {return (obj.gsx$air == ('') );}
|
||||||
).where(
|
).where(
|
||||||
(obj) => {return (obj.gsx$earth == (0||'') );}
|
(obj) => {return (obj.gsx$earth == ('') );}
|
||||||
).where(
|
).where(
|
||||||
(obj) => {return (obj.gsx$water == (0||'') );}
|
(obj) => {return (obj.gsx$water == ('') );}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Search by elements
|
// Search by elements
|
||||||
|
|
@ -176,7 +176,7 @@ export default class CollectionHome extends React.Component {
|
||||||
elementsList.push({'$regex': new RegExp(element, 'i')});
|
elementsList.push({'$regex': new RegExp(element, 'i')});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let elementsList2 = [{'gsx$fire': {'$gt': 0}}, {'gsx$air': {'$gt': 0}}, {'gsx$earth': {'$gt': 0}}, {'gsx$water': {'$gt': 0}}]
|
let elementsList2 = [{'gsx$fire': {'$gte': 0}}, {'gsx$air': {'$gte': 0}}, {'gsx$earth': {'$gte': 0}}, {'gsx$water': {'$gte': 0}}]
|
||||||
if (elementsList.length > 0) {
|
if (elementsList.length > 0) {
|
||||||
if (this.swamp == "or") {
|
if (this.swamp == "or") {
|
||||||
creatureResults = creatureResults.find({'gsx$elements': {'$or': elementsList} });
|
creatureResults = creatureResults.find({'gsx$elements': {'$or': elementsList} });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user