From c9f9759da98bc93707b67c302a509958d4dfaded Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Sun, 31 Aug 2025 20:56:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(updater):=20=E4=B8=BAHTTP=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A4=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当HTTP请求失败时,如果错误信息为空则显示"Unknown HTTP error",避免用户看到空提示 --- updater.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updater.lua b/updater.lua index 6009630..2999d3b 100644 --- a/updater.lua +++ b/updater.lua @@ -79,7 +79,7 @@ local function dl(f) until evt[1] == "http_success" or evt[1] == "http_failure" if evt[1] == "http_failure" then - term.at(1, h).write(evt[3]) + term.at(1, h).write(evt[3] or "Unknown HTTP error") local id = os.startTimer(5) repeat local _,i = coroutine.yield() until i == id