summaryrefslogtreecommitdiff
path: root/server/src/vm/vm.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-28 15:31:04 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-28 15:31:04 +0800
commitf9d9266198cb54cadb7e75815a39bf2ce29ff045 (patch)
tree4214e85a2cc3e216585ca2bd86ace82a4a5beafb /server/src/vm/vm.lua
parentdeaf17c3d358085dcf9b8c4cf014b83daf5bf149 (diff)
downloadlua-language-server-f9d9266198cb54cadb7e75815a39bf2ce29ff045.zip
解决 x or 0 + 1
Diffstat (limited to 'server/src/vm/vm.lua')
-rw-r--r--server/src/vm/vm.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua
index 332f4a69..afe455d5 100644
--- a/server/src/vm/vm.lua
+++ b/server/src/vm/vm.lua
@@ -1128,7 +1128,10 @@ function mt:eachSource(callback)
end
local sources = self.sources
for i = 1, #sources do
- callback(sources[i])
+ local res = callback(sources[i])
+ if res ~= nil then
+ return res
+ end
end
end