fix(striker-ui-api): correct sanitize number query param

main
Tsu-ba-me 2 years ago
parent 35471cbedc
commit 5d81d4934d
  1. 2
      striker-ui-api/src/lib/sanitizeQS.ts

@ -13,7 +13,7 @@ type MapToReturnFunction = {
const MAP_TO_RETURN_FUNCTION: MapToReturnFunction = { const MAP_TO_RETURN_FUNCTION: MapToReturnFunction = {
boolean: (qs) => qs !== undefined, boolean: (qs) => qs !== undefined,
number: (qs) => (Number.isFinite(qs) ? parseFloat(String(qs)) : 0), number: (qs) => parseFloat(String(qs)) || 0,
string: (qs) => (qs ? String(qs) : ''), string: (qs) => (qs ? String(qs) : ''),
'string[]': (qs) => { 'string[]': (qs) => {
let result: string[] = []; let result: string[] = [];

Loading…
Cancel
Save