pcall(function, varargs)

This commit is contained in:
Mihail 2024-07-31 13:37:46 +04:00 committed by GitHub
parent 10fa828bd7
commit e74f65eb70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,8 +45,8 @@ function submit(text)
setup_variables()
document.log.caret = -1
local status, result = pcall(function() return console.execute(text) end)
if result ~= nil then
local status, result = pcall(console.execute, text)
if result then
console.log(result)
end
document.prompt.text = ""