Skip to content

Commit 70db2c2

Browse files
committed
suppress invalid filters
1 parent b392bc1 commit 70db2c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/helpers.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,9 @@ function attachQueries (request) {
324324
}
325325

326326
// Attach match option.
327-
if (parameter.match(isFilter)) {
328-
const matches = parameter.match(inBrackets) || []
327+
else if (parameter.match(isFilter)) {
328+
const matches = parameter.match(inBrackets)
329+
if (!matches) continue
329330
const field = inflect(matches[1])
330331
const filterType = matches[2]
331332

0 commit comments

Comments
 (0)