From c4d29fa131e966d7fcbcb9bb502273eac672d459 Mon Sep 17 00:00:00 2001 From: Daniil Palagin Date: Thu, 6 Mar 2025 16:03:00 +0100 Subject: [PATCH] [#378] Make viewing forms in storybook more robust --- src/model/FormGenerator.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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,