From 647e50e87abf506e96f2c6324808945203864d80 Mon Sep 17 00:00:00 2001 From: Liu Xin Date: Fri, 20 Oct 2023 15:28:17 +0800 Subject: [PATCH] fix: Fix the type of number when entering the routing rule path (#4213) Signed-off-by: harrisonliu5 --- src/components/Inputs/RulePath/index.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Inputs/RulePath/index.jsx b/src/components/Inputs/RulePath/index.jsx index 942ced69135..3a00369799a 100644 --- a/src/components/Inputs/RulePath/index.jsx +++ b/src/components/Inputs/RulePath/index.jsx @@ -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)) }