From 7d85cf94b0c56406581a1f7fbc295ac2f59dc4d9 Mon Sep 17 00:00:00 2001 From: burdinbogdan Date: Thu, 27 Jan 2022 15:29:35 +0200 Subject: [PATCH] fix: add splitting of values for btw operator (#150) --- src/paginate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/paginate.ts b/src/paginate.ts index 559ade2..26daa98 100644 --- a/src/paginate.ts +++ b/src/paginate.ts @@ -147,7 +147,7 @@ function parseFilter(query: PaginateQuery, config: PaginateConfig) { continue } if (isOperator(op1)) { - const args = op1 === FilterOperator.IN ? value.split(',') : value + const args = op1 === FilterOperator.IN || op1 === FilterOperator.BTW ? value.split(',') : value filter[column] = op1 === FilterOperator.BTW ? getOperatorFn(op1)(args[0], args[1]) : getOperatorFn(op1)(args) }