LiteSun commented on a change in pull request #1785:
URL: https://github.com/apache/apisix-dashboard/pull/1785#discussion_r615335796



##########
File path: web/src/pages/Route/transform.ts
##########
@@ -158,7 +158,11 @@ export const transformStepData = ({
         default:
           key = `arg_${name}`;
       }
-      return [key, operator, value];
+      let finalValue = value
+      if (operator === "IN") {
+        finalValue = JSON.parse(value as string)

Review comment:
       Does value possible be `""`? It may cause  an error here. 
`JSON.parse("")`

##########
File path: web/src/pages/Route/transform.ts
##########
@@ -236,14 +240,15 @@ export const transformStepData = ({
 };
 
 const transformVarsToRules = (
-  data: [string, RouteModule.Operator, string][] = [],
+  data: [string, RouteModule.Operator, string | any[]][] = [],
 ): RouteModule.MatchingRule[] =>
   data.map(([key, operator, value]) => {
     const [, position, name] = key.split(/^(cookie|http|arg)_/);
+    console.log({key, operator, value})

Review comment:
       please remove log info.

##########
File path: web/src/global.less
##########
@@ -66,7 +66,6 @@ ol {
   }
 }
 
-// 兼容IE11

Review comment:
       use English comment will be better




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to