Skip to content

Commit 8d0978c

Browse files
committed
Simplified code a little bit.
1 parent d86a515 commit 8d0978c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/resty/tags.lua

+1-6
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,7 @@ end
244244
local mt = {}
245245
function mt:__index(k)
246246
-- TODO: should we have special handling for table and select (the built-in Lua functions)?
247-
if elements[k] then
248-
return tag.new{
249-
name = k,
250-
childs = {}
251-
}
252-
elseif _G[k] then
247+
if not elements[k] and _G[k] then
253248
return _G[k]
254249
else
255250
return tag.new{

0 commit comments

Comments
 (0)