pull/4005/head
daszgfz 6 years ago
parent 36006d8076
commit 997a6c85bd

@ -9,13 +9,13 @@ export default function get_slot_data(values: Map<string, Attribute>, block: Blo
properties: Array.from(values.values()) properties: Array.from(values.values())
.filter(attribute => attribute.name !== 'name') .filter(attribute => attribute.name !== 'name')
.map(attribute => { .map(attribute => {
const value = get_value(attribute, block); const value = get_value(block, attribute);
return p`${attribute.name}: ${value}`; return p`${attribute.name}: ${value}`;
}) })
}; };
} }
function get_value(attribute: Attribute, block: Block = null) { function get_value(block: Block, attribute: Attribute) {
if (attribute.is_true) return x`true`; if (attribute.is_true) return x`true`;
if (attribute.chunks.length === 0) return x`""`; if (attribute.chunks.length === 0) return x`""`;

Loading…
Cancel
Save