Software / code / prosody
Changeset
9060:69bc3144c2b7
util.serialization: Tighten up type checks
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 29 Jul 2018 00:17:41 +0200 |
| parents | 9059:e1db06a0cc6b |
| children | 9061:82dd435c942c |
| files | util/serialization.lua |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/serialization.lua Thu Jul 26 00:17:23 2018 +0200 +++ b/util/serialization.lua Sun Jul 29 00:17:41 2018 +0200 @@ -151,9 +151,9 @@ 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