You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/18 03:20:36 UTC

[GitHub] [apisix] membphis commented on a change in pull request #3595: fix: should assign value to `api_ctx.global_rules` before running global rules

membphis commented on a change in pull request #3595:
URL: https://github.com/apache/apisix/pull/3595#discussion_r578105268



##########
File path: apisix/plugin.lua
##########
@@ -689,6 +689,10 @@ function _M.run_global_rules(api_ctx, global_rules, phase_name)
         local orig_conf_version = api_ctx.conf_version

Review comment:
       better style, we can fix it in a new PR
   
   ```lua
   function _M.run_global_rules(api_ctx, global_rules, phase_name)
       if not global_rules or not global_rules.values
          and #global_rules.values == 0 then
           return
       end
   
       -- your code
   end




----------------------------------------------------------------
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:
users@infra.apache.org