Skip to content

Commit f3b5d1c

Browse files
nickgieschendziraf
authored andcommitted
fix: availableValues regression
availableValues is a function so it's always not null. Therefore, unless it is called, this block never gets called and the filter always uses = and never like.
1 parent 4b8cacd commit f3b5d1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Resource.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export class Resource extends BaseResource {
168168
&& ['date', 'datetime'].includes(filter.property.type())
169169
) {
170170
q.whereBetween(key, [filter.value.from, filter.value.to]);
171-
} else if (filter.property.type() === 'string' && !filter.property.availableValues) {
171+
} else if (filter.property.type() === 'string' && !filter.property.availableValues()) {
172172
if (this.dialect === 'postgresql') {
173173
q.whereILike(key, `%${filter.value}%`);
174174
} else {

0 commit comments

Comments
 (0)