Skip to content

Commit

Permalink
chore(api): improve filter check for item class filter
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak committed Dec 3, 2023
1 parent d456e2a commit a48a5b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/spelunker-api/src/lib/entities/Item.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Item extends DatabaseEntity {
}

static filter(query, filters) {
if (filters?.itemClassIds?.length > 0) {
if (filters?.itemClassIds?.length ?? 0 > 0) {
query.andWhere('class', 'IN', filters.itemClassIds);
}
}
Expand Down

0 comments on commit a48a5b1

Please sign in to comment.