aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-23 16:11:13 +0200
committerKim Alvefur <zash@zash.se>2018-09-23 16:11:13 +0200
commit05f16b4a2f165d5b84aceb6c1082375f7b769d93 (patch)
tree072c7ee3a80d68737be8a5a2a725d4d34fd491cb /util
parentbeedd0937e4c5a97841be0148a55c059111aef7f (diff)
downloadprosody-05f16b4a2f165d5b84aceb6c1082375f7b769d93.tar.gz
prosody-05f16b4a2f165d5b84aceb6c1082375f7b769d93.zip
util.serialization: Stricter type check
Diffstat (limited to 'util')
-rw-r--r--util/serialization.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/serialization.lua b/util/serialization.lua
index 960794f2..5a8eef81 100644
--- a/util/serialization.lua
+++ b/util/serialization.lua
@@ -142,7 +142,7 @@ local function new(opt)
if freeze then
-- opportunity to do pre-serialization
local mt = getmetatable(t);
- local fr = (freeze ~= true and freeze[mt]);
+ local fr = (type(freeze) == "table" and freeze[mt]);
local mf = mt and mt.__freeze;
local tag;
if type(fr) == "string" then