aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-07-29 00:17:41 +0200
committerKim Alvefur <zash@zash.se>2018-07-29 00:17:41 +0200
commit6eb0c63e0de166776d590e4d65cc85c376226000 (patch)
tree62c08fc76e7269dee642657223a571f62b87f943 /util
parent760303fb27289b4e723aeedf6fdd2f13900d76b6 (diff)
downloadprosody-6eb0c63e0de166776d590e4d65cc85c376226000.tar.gz
prosody-6eb0c63e0de166776d590e4d65cc85c376226000.zip
util.serialization: Tighten up type checks
Diffstat (limited to 'util')
-rw-r--r--util/serialization.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/serialization.lua b/util/serialization.lua
index 74d83a50..960794f2 100644
--- a/util/serialization.lua
+++ b/util/serialization.lua
@@ -151,9 +151,9 @@ local function new(opt)
elseif mt then
tag = mt.__type;
end
- if fr then
+ if type(fr) == "function" then
t = fr(t);
- if tag then
+ if type(tag) == "string" then
o[l], l = tag, l + 1;
end
end