Skip to content

Commit

Permalink
fix: Fix the type of number when entering the routing rule path (#4213)
Browse files Browse the repository at this point in the history
Signed-off-by: harrisonliu5 <harrisonliu@kubesphere.io>
  • Loading branch information
harrisonliu5 committed Oct 20, 2023
1 parent 481f47e commit 647e50e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Inputs/RulePath/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ export default class RulePath extends React.Component {
const { onChange } = this.props

const servicePort = get(value, 'backend.service.port.number')
if (isNumber(servicePort)) {

if (servicePort && isNumber(parseInt(servicePort, 10))) {
set(value, 'backend.service.port.number', Number(servicePort))
}

Expand Down

0 comments on commit 647e50e

Please sign in to comment.