fix zen mode with attributes, closes #1213

This commit is contained in:
zadam
2020-09-04 23:35:10 +02:00
parent 0c72d29684
commit ceb762e56b
5 changed files with 75 additions and 58 deletions

View File

@@ -11,19 +11,15 @@ function renderAttribute(attribute, $container, renderIsInheritable) {
$container.append('=');
$container.append(document.createTextNode(formatValue(attribute.value)));
}
$container.append(" ");
} else if (attribute.type === 'relation') {
if (attribute.isAutoLink) {
return;
}
// when the relation has just been created then it might not have a value
if (attribute.value) {
$container.append(document.createTextNode('~' + attribute.name + isInheritable + "="));
$container.append(createNoteLink(attribute.value));
$container.append(" ");
} else {
ws.logError(`Relation ${attribute.attributeId} has empty target`);
}
} else {
ws.logError("Unknown attr type: " + attribute.type);