aboutsummaryrefslogtreecommitdiffstats
path: root/teal-src/prosody/util/jsonpointer.tl
diff options
context:
space:
mode:
Diffstat (limited to 'teal-src/prosody/util/jsonpointer.tl')
-rw-r--r--teal-src/prosody/util/jsonpointer.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/teal-src/prosody/util/jsonpointer.tl b/teal-src/prosody/util/jsonpointer.tl
index c21e1fbf..af29bda0 100644
--- a/teal-src/prosody/util/jsonpointer.tl
+++ b/teal-src/prosody/util/jsonpointer.tl
@@ -23,7 +23,7 @@ local function resolve_json_pointer(ref : table, path : string) : any, ptr_error
new_ref = ref[token]
elseif idx is integer then
local i = tonumber(token)
- if token == "-" then i = #ref + 1 end
+ if token == "-" then i = #(ref as {any}) + 1 end
new_ref = ref[i+1]
else
return nil, "invalid-table"