summaryrefslogtreecommitdiff
path: root/script-beta/core/hover/label.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/core/hover/label.lua')
-rw-r--r--script-beta/core/hover/label.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/core/hover/label.lua b/script-beta/core/hover/label.lua
index e0032979..3b1c5d0a 100644
--- a/script-beta/core/hover/label.lua
+++ b/script-beta/core/hover/label.lua
@@ -126,6 +126,9 @@ local function asNumber(source)
end
local uri = guide.getUri(source)
local text = files.getText(uri)
+ if not text then
+ return nil
+ end
local raw = text:sub(source.start, source.finish)
if not raw or not raw:find '[^%-%d%.]' then
return nil