aboutsummaryrefslogtreecommitdiffstats
path: root/teal-src/util/datamapper.tl
diff options
context:
space:
mode:
Diffstat (limited to 'teal-src/util/datamapper.tl')
-rw-r--r--teal-src/util/datamapper.tl5
1 files changed, 4 insertions, 1 deletions
diff --git a/teal-src/util/datamapper.tl b/teal-src/util/datamapper.tl
index 99431f86..ed7ce62c 100644
--- a/teal-src/util/datamapper.tl
+++ b/teal-src/util/datamapper.tl
@@ -168,7 +168,10 @@ function parse_object (schema : schema_t, s : st.stanza_t) : { string : any }
out[prop] = parse_object(propschema, c);
end
elseif proptype == "array" then
- out[prop] = parse_array(propschema, s);
+ local a = parse_array(propschema, s);
+ if a and a[1] ~= nil then
+ out[prop] = a;
+ end
else
error "unreachable"
end