diff options
author | Kim Alvefur <zash@zash.se> | 2018-09-23 16:11:13 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-09-23 16:11:13 +0200 |
commit | 05f16b4a2f165d5b84aceb6c1082375f7b769d93 (patch) | |
tree | 072c7ee3a80d68737be8a5a2a725d4d34fd491cb | |
parent | beedd0937e4c5a97841be0148a55c059111aef7f (diff) | |
download | prosody-05f16b4a2f165d5b84aceb6c1082375f7b769d93.tar.gz prosody-05f16b4a2f165d5b84aceb6c1082375f7b769d93.zip |
util.serialization: Stricter type check
-rw-r--r-- | util/serialization.lua | 2 |
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 |