Hide empty Properties key

This commit is contained in:
Misode
2020-12-29 01:18:52 +01:00
parent 00d794a138
commit 1a568be1e6

View File

@@ -202,6 +202,7 @@ export const renderHtml: Hook<[any, Mounter], [string, string, string]> = {
const category = field.category(childPath)
const [cPrefix, cSuffix, cBody] = field.hook(this, childPath, value[k], mounter)
if (k === 'Properties' && cSuffix === '') return ''
return `<div class="node ${field.type(childPath)}-node ${cBody ? '' : 'no-body'}" ${category ? `data-category="${htmlEncode(category)}"` : ''}>
<div class="node-header">
${error(childPath, mounter)}