From cfd9939902ae0f2050b0d02ab923abf53743c967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 30 Jan 2019 12:29:03 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E5=A4=84=E5=86=85=E5=AD=98?= =?UTF-8?q?=E6=B3=84=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/value.lua | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'server') diff --git a/server/src/core/value.lua b/server/src/core/value.lua index 5426815f..53d5c749 100644 --- a/server/src/core/value.lua +++ b/server/src/core/value.lua @@ -195,15 +195,20 @@ function mt:eachField(callback, mark, stack) end function mt:removeUri(uri) - if not self._child then - return + if self._child then + self._child[uri] = nil + self:rawEachField(function (field) + if field.value then + field.value:removeUri(uri) + end + end) + end + if self._info then + self._info[uri] = nil + end + if self._meta then + self._meta[uri] = nil end - self._child[uri] = nil - self:rawEachField(function (field) - if field.value then - field.value:removeUri(uri) - end - end) end function mt:getDeclarat() -- cgit v1.2.3