From 6eb0c63e0de166776d590e4d65cc85c376226000 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 29 Jul 2018 00:17:41 +0200 Subject: util.serialization: Tighten up type checks --- util/serialization.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/serialization.lua') 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 -- cgit v1.2.3