diff options
Diffstat (limited to 'server/src/matcher')
-rw-r--r-- | server/src/matcher/compile.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/server/src/matcher/compile.lua b/server/src/matcher/compile.lua index 4776623b..ecfdbdd4 100644 --- a/server/src/matcher/compile.lua +++ b/server/src/matcher/compile.lua @@ -157,12 +157,10 @@ function mt:searchSimple(simple) end end else - if obj.index then - if obj.type == 'string' or obj.type == 'number' or obj.type == 'boolean' then - var = self:getField(var, obj[1], obj) - if i ~= #simple then - self:addInfo(var, 'get', obj) - end + if obj.index and (obj.type == 'string' or obj.type == 'number' or obj.type == 'boolean') then + var = self:getField(var, obj[1], obj) + if i ~= #simple then + self:addInfo(var, 'get', obj) end else self:searchExp(obj) @@ -266,7 +264,7 @@ function mt:markSimple(simple) var = nil end else - if obj.index then + if obj.index and (obj.type == 'string' or obj.type == 'number' or obj.type == 'boolean') then var = self:addField(var, obj[1], obj) if i == #simple then self:addInfo(var, 'set', obj) |