Skip to content

Commit

Permalink
[Cleanup] Ensure string parameters are trimmed and not null (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrozenberg authored Dec 18, 2023
1 parent d2f82db commit fc0e029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/requests/extract-reporting-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import safeDecodeURIComponent from 'safe-decode-uri-component';

export function extractReportingParams(params) {
const boolProp = (key) => params[key] === '1';
const strProp = (key) => params[key] || '';
const strProp = (key) => params[key]?.trim() ?? '';

return {
assert: boolProp('a'),
Expand Down

0 comments on commit fc0e029

Please sign in to comment.