diff options
-rw-r--r-- | server/src/core/value.lua | 21 |
1 files changed, 13 insertions, 8 deletions
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() |