mirror of
https://github.com/bjc/prosody.git
synced 2025-04-06 06:37:37 +03:00
util.datamapper: Fix to skip parsing wrapped arrays that aren't there
Turns out the unreachable error is reachable :D
This commit is contained in:
parent
110e82bd93
commit
f68d29bafd
2 changed files with 0 additions and 4 deletions
|
@ -175,8 +175,6 @@ function parse_object (schema : schema_t, s : st.stanza_t) : { string : any }
|
||||||
local wrapper = s:get_child(name, namespace);
|
local wrapper = s:get_child(name, namespace);
|
||||||
if wrapper then
|
if wrapper then
|
||||||
out[prop] = parse_array(propschema, wrapper);
|
out[prop] = parse_array(propschema, wrapper);
|
||||||
else
|
|
||||||
error "unreachable"
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local value : string = extract_value (s, value_where, proptype, name, namespace, prefix, single_attribute, enums)
|
local value : string = extract_value (s, value_where, proptype, name, namespace, prefix, single_attribute, enums)
|
||||||
|
|
|
@ -143,8 +143,6 @@ function parse_object(schema, s)
|
||||||
local wrapper = s:get_child(name, namespace);
|
local wrapper = s:get_child(name, namespace);
|
||||||
if wrapper then
|
if wrapper then
|
||||||
out[prop] = parse_array(propschema, wrapper);
|
out[prop] = parse_array(propschema, wrapper);
|
||||||
else
|
|
||||||
error("unreachable")
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local value = extract_value(s, value_where, proptype, name, namespace, prefix, single_attribute, enums)
|
local value = extract_value(s, value_where, proptype, name, namespace, prefix, single_attribute, enums)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue