Skip to content

Commit

Permalink
fix: remove null or undefined values from /queries endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
christianmat committed Nov 22, 2024
1 parent 2339970 commit d1a9708
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/trench/src/queries/queries.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,7 @@ export function parseJsonFields(json: Record<string, any>): Record<string, any>
}

export function convertObjectToArray(object: Record<string, any>): any[] {
return Object.values(object)
const values = Object.values(object)

return values.filter((value) => value !== null && value !== undefined)
}

0 comments on commit d1a9708

Please sign in to comment.