diff --git a/src/model/FormGenerator.js b/src/model/FormGenerator.js index 1db5e3c4..40a22d7a 100644 --- a/src/model/FormGenerator.js +++ b/src/model/FormGenerator.js @@ -33,11 +33,11 @@ export default class FormGenerator { let formProperties; let form; return jsonld - .flatten(structure, {}) - .then((flattenedStructure) => { + .compact(structure, {}) + .then((compactedStructure) => { try { const [formQuestions, rootForm] = - FormGenerator._constructFormQuestions(flattenedStructure, intl); + FormGenerator._constructFormQuestions(compactedStructure, intl); form = rootForm; formProperties = { formQuestions,