aboutsummaryrefslogtreecommitdiffstats
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
commited7c24bd0d2c888b1fc19107a8840971cb8d1468 (patch)
tree072c7ee3a80d68737be8a5a2a725d4d34fd491cb
parent94b922ba3f60c0ab41302157ede9951f323a060c (diff)
downloadprosody-ed7c24bd0d2c888b1fc19107a8840971cb8d1468.tar.gz
prosody-ed7c24bd0d2c888b1fc19107a8840971cb8d1468.zip
util.serialization: Stricter type check
-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