Skip to content

Build your personal knowledge base with Trilium Notes

chore(client/ts): port services/attribute_renderer

Elian Doran5d5a68170aec
diff --git a/src/public/app/services/attribute_renderer.js b/src/public/app/services/attribute_renderer.ts
similarity index 95%
rename from src/public/app/services/attribute_renderer.js
rename to src/public/app/services/attribute_renderer.ts
index 8916665a39..da620f365b 100644
--- a/src/public/app/services/attribute_renderer.js
+++ b/src/public/app/services/attribute_renderer.ts
@@ -20,7 +20,11 @@ async function renderAttribute(attribute, renderIsInheritable) {
// when the relation has just been created, then it might not have a value
if (attribute.value) {
$attr.append(document.createTextNode(`~${attribute.name}${isInheritable}=`));
- $attr.append(await createLink(attribute.value));
+
+ const link = await createLink(attribute.value);
+ if (link) {
+ $attr.append(link);
+ }
}
} else {
ws.logError(`Unknown attr type: ${attribute.type}`);