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
commitf12bf9ef07fb112e0964ef90c1a7224fc55d4fd5 (patch)
tree62c08fc76e7269dee642657223a571f62b87f943 /util
parentb730faac776a1110b9e0a15dba57db715fdda86e (diff)
downloadprosody-f12bf9ef07fb112e0964ef90c1a7224fc55d4fd5.tar.gz
prosody-f12bf9ef07fb112e0964ef90c1a7224fc55d4fd5.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