membphis commented on code in PR #12465:
URL: https://github.com/apache/apisix/pull/12465#discussion_r2244936391


##########
apisix/plugins/workflow.lua:
##########
@@ -123,13 +123,13 @@ function _M.check_schema(conf)
             if not ok then
                 return false, "failed to validate the 'case' expression: " .. 
err
             end
-            setmetatable(rule, {
-                __index = function(_, key)
-                    if key == "__expr" then
-                        return expr
-                    end
+            local mt = getmetatable(rule) or {}

Review Comment:
   pls take a look at this style:
   
   ```
   local my_table = {}
   
   local meta = getmetatable(my_table)
   if not meta then
       meta = {}
       setmetatable(my_table, meta) 
   end
   
   meta.a = "a" 



-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to