Skip to content

Commit

Permalink
Don't add invalid filters to the query url
Browse files Browse the repository at this point in the history
  • Loading branch information
CannonLock committed Dec 18, 2023
1 parent d5d4b96 commit cde4aa9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/maps/@id/edit/table-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ export function buildURL(baseURL: string, dataParameters: DataParameters){
// Add the rest of the filters
if(dataParameters?.filter != undefined){
for(const filter of Object.values(dataParameters?.filter)){
const [columnName, filterValue] = filter.to_array()
url.searchParams.append(columnName, filterValue);
if(filter.is_valid()){
const [columnName, filterValue] = filter.to_array()
url.searchParams.append(columnName, filterValue);
}
}
}

Expand Down

0 comments on commit cde4aa9

Please sign in to comment.