aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-10-09 15:50:25 +0200
committerKim Alvefur <zash@zash.se>2022-10-09 15:50:25 +0200
commitf150495cea5218ae1fe8071ed1e58fc4906bd28a (patch)
tree34e2f5ac7ac00459e59f1e2ad61a4ca18f5ec96b /util
parentf8f90ea923315383477b936e1ec109ec30eb2dd3 (diff)
parentbca11bfc73a7ca44daec5854f3c883911bb617ea (diff)
downloadprosody-f150495cea5218ae1fe8071ed1e58fc4906bd28a.tar.gz
prosody-f150495cea5218ae1fe8071ed1e58fc4906bd28a.zip
Merge 0.12->trunk
Diffstat (limited to 'util')
-rw-r--r--util/jsonschema.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/jsonschema.lua b/util/jsonschema.lua
index 48a3351f..eafa8b7c 100644
--- a/util/jsonschema.lua
+++ b/util/jsonschema.lua
@@ -1,7 +1,7 @@
-- This file is generated from teal-src/util/jsonschema.lua
-local m_type = math.type or function (n)
- return n % 1 == 0 and n <= 9007199254740992 and n >= -9007199254740992 and "integer" or "float";
+local m_type = function(n)
+ return type(n) == "number" and n % 1 == 0 and n <= 9007199254740992 and n >= -9007199254740992 and "integer" or "float";
end;
local json = require("util.json")
local null = json.null;
@@ -81,7 +81,7 @@ function complex_validate(schema, data, root)
if type(data) == "table" then
for i in pairs(data) do
- if not (math.type(i) == "integer") then
+ if not (m_type(i) == "integer") then
return false
end
end