diff options
author | Kim Alvefur <zash@zash.se> | 2018-07-29 00:17:41 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-07-29 00:17:41 +0200 |
commit | f12bf9ef07fb112e0964ef90c1a7224fc55d4fd5 (patch) | |
tree | 62c08fc76e7269dee642657223a571f62b87f943 /util/serialization.lua | |
parent | b730faac776a1110b9e0a15dba57db715fdda86e (diff) | |
download | prosody-f12bf9ef07fb112e0964ef90c1a7224fc55d4fd5.tar.gz prosody-f12bf9ef07fb112e0964ef90c1a7224fc55d4fd5.zip |
util.serialization: Tighten up type checks
Diffstat (limited to 'util/serialization.lua')
-rw-r--r-- | util/serialization.lua | 4 |
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 |