getContent of expandablefield corrected

parent 427593de
...@@ -479,16 +479,19 @@ ...@@ -479,16 +479,19 @@
allowed_sub_keys allowed_sub_keys
= Object.keys( = Object.keys(
gadget.props.definition.property_def.properties gadget.props.definition.property_def.properties
); );
for (j = 0; j <= sub_keys.length-1; j += 1) { for (j = 0; j <= sub_keys.length-1; j += 1) {
// if any of the keys is not in the allowed_sub_keys // if any of the keys is not in the allowed_sub_keys
if (!(allowed_sub_keys.indexOf(sub_keys[j]) > -1)) { if (!(allowed_sub_keys.indexOf(sub_keys[j]) > -1)) {
// remove it // remove it
delete results[ delete results[
Object.keys(results)[0] Object.keys(results)[0]
][keys[index]][sub_keys[i]]; ][keys[index]][sub_keys[j]];
} }
} }
} else {
// if the definition has no props then the object is empty
results[Object.keys(results)[0]][keys[index]] = {};
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment