diff options
-rw-r--r-- | server/src/core/completion.lua | 3 | ||||
-rw-r--r-- | server/src/vm/value.lua | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua index c7ac9310..2204c369 100644 --- a/server/src/core/completion.lua +++ b/server/src/core/completion.lua @@ -230,6 +230,9 @@ local function searchFields(vm, source, word, callback) return end local v = parent:getChild(k) + if not v then + return + end if source:get 'object' and v:getType() ~= 'function' then return end diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index 73c47cb0..1c7fe04e 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -167,7 +167,7 @@ function mt:getChild(index, source) end parent = method end - if not value then + if not value and source then value = create('any', source) self:setChild(index, value) value.uri = self.uri |