Skip to content

Commit

Permalink
bugfix for query
Browse files Browse the repository at this point in the history
  • Loading branch information
haorendashu committed Jul 5, 2024
1 parent 2b6a17a commit 91942ca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,17 @@ function queryEventsSql(filter, doCount, params) {
key = 'kinds';
let limit1Kind = false;
if (filter[key] != null && filter[key] instanceof Array && filter[key].length > 0) {
params.push.apply(params, filter[key]);
conditions.push('kind IN('+makePlaceHolders(filter[key].length)+')')
filter[key] = null;

if (filter[key].length == 1) {
let kind = filter[key];
let kind = filter[key][0];
// these kind event should only return 1 event back.
if (kind == "0" || kind == "3" || kind == "10002") {
if (kind == 0 || kind == 3 || kind == 10002) {
limit1Kind = true;
}
}

params.push.apply(params, filter[key]);
conditions.push('kind IN('+makePlaceHolders(filter[key].length)+')')
filter[key] = null;
}

key = 'since';
Expand Down

0 comments on commit 91942ca

Please sign in to comment.