summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/parser/guide.lua4
-rw-r--r--script/provider/provider.lua9
-rw-r--r--script/service/telemetry.lua2
3 files changed, 9 insertions, 6 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 27e5a420..0872fa15 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -1471,6 +1471,9 @@ function m.checkSameSimpleInValueOfSetMetaTable(status, func, start, pushQueue)
local call = func.parent
local args = call.args
local obj = args[1]
+ if not args then
+ return
+ end
local mt = args[2]
if obj then
pushQueue(obj, start, true)
@@ -2312,6 +2315,7 @@ function m.pushResult(status, mode, ref, simple)
results[#results+1] = ref
end
if m.isLiteral(ref)
+ and ref.parent
and ref.parent.type == 'callargs'
and ref ~= simple.node then
results[#results+1] = ref
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 32778399..c71b14fa 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -35,6 +35,10 @@ local function updateConfig()
}
},
})
+ if not configs or not configs[1] then
+ log.warn('No config?', util.dump(configs))
+ return
+ end
local updated = configs[1]
local other = {
@@ -42,11 +46,6 @@ local function updateConfig()
exclude = configs[3],
}
- if not updated then
- log.warn('No config?', util.dump(configs))
- return
- end
-
local oldConfig = util.deepCopy(config.config)
local oldOther = util.deepCopy(config.other)
config.setConfig(updated, other)
diff --git a/script/service/telemetry.lua b/script/service/telemetry.lua
index 52ad193b..c5f73a36 100644
--- a/script/service/telemetry.lua
+++ b/script/service/telemetry.lua
@@ -68,7 +68,7 @@ timer.wait(5, function ()
if not suc then
suc, link = pcall(net.connect, 'tcp', '119.45.194.183', 11577)
end
- if not suc then
+ if not suc or not link then
return
end
function link:on_connect()