diff --git a/js/view.js b/js/view.js index a7992a8d..69f67f75 100644 --- a/js/view.js +++ b/js/view.js @@ -440,6 +440,12 @@ function generateObject(data, struct, options) { $body.append($field); } } + if (struct.card === false) { + // Note: JSON.parse(JSON.stringify(out)) can remove undefined values in the out object. + if (Object.keys(JSON.parse(JSON.stringify(out))).length === 0) { + out = undefined + } + } $body.children().first().children('button').removeClass('mt-3'); $body.children().first().removeClass('mt-3'); return {out: out, component: $el};