From ab8fe19a04e3ee945401b0de0c4c62050801f1b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 3 Dec 2018 19:28:47 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/matcher/compile.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'server/src') 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) -- cgit v1.2.3