Skip to content

Commit

Permalink
fix(console): when query value is empty ,url is wrong (tkestack#1707)
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-hnny committed Dec 9, 2021
1 parent c223f9b commit 93916cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/console/helpers/urlUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ export const reduceK8sQueryString = ({
// 也许value是object,即labelSelector 或者 fieldSelector
value = isObject(value)
? Object.entries(value)
.map(([key, value]) => `${key}${value && '='}${value}`)
.filter(([_, value]) => value)
.map(([key, value]) => `${key}=${value}`)
.join(',')
: value;

Expand Down

0 comments on commit 93916cd

Please sign in to comment.