Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
shreemaan-abhishek committed Nov 21, 2023
1 parent f30fe75 commit 533a626
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions apisix/core/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,9 @@ do
local _escaper

local function resolve(m)
local i = 1
-- if first capture's first char is "{" evaluate the second capture
if m[1]:byte(1) == 123 then
i = 2
end
local v = _ctx[m[i]]
local variable = m[2] or m[3]
local v = _ctx[variable]

if v == nil then
return ""
end
Expand Down

0 comments on commit 533a626

Please sign in to comment.