Skip to content

Commit ad9879b

Browse files
committed
ui: trim whitespace from api params
Fixes #10627 Signed-off-by: Abhishek Kumar <[email protected]>
1 parent f13cf59 commit ad9879b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ui/src/api/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export function api (command, args = {}, method = 'GET', data = {}) {
3131
if (data) {
3232
params = new URLSearchParams()
3333
Object.entries(data).forEach(([key, value]) => {
34+
if (typeof value === 'string' && value.trim() !== '') {
35+
value = value.trim()
36+
}
3437
params.append(key, value)
3538
})
3639
}

0 commit comments

Comments
 (0)