Skip to content

Commit

Permalink
Fix empty date filter on order list (#4226)
Browse files Browse the repository at this point in the history
* Fix empty date filter on order list

* add changeset
  • Loading branch information
Droniu committed Sep 22, 2023
1 parent 67bfc30 commit 3a49aa0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/stupid-pans-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Fix empty date filter on order list
5 changes: 4 additions & 1 deletion src/utils/filters/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ export function getGteLteVariables<T>(variables: GteLte<T>): GteLte<T> | null {
if (
!![variables.gte, variables.lte].some(
v =>
v !== undefined && v !== null && !(typeof v === "number" && isNaN(v)),
v !== undefined &&
v !== null &&
v !== "" &&
!(typeof v === "number" && isNaN(v)),
)
) {
return variables;
Expand Down

0 comments on commit 3a49aa0

Please sign in to comment.