From 2f5ca71a40e2c0ea695dfb68b6c0e2e6123417d1 Mon Sep 17 00:00:00 2001 From: harrisonliu5 Date: Fri, 20 Oct 2023 14:34:45 +0800 Subject: [PATCH] fix: Fix the type of number when entering the routing rule path 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)) }