Skip to content

Build your personal knowledge base with Trilium Notes

Update apps/client/src/services/note_tooltip.ts

Adorian Doran44d03bc988e5
diff --git a/apps/client/src/services/note_tooltip.ts b/apps/client/src/services/note_tooltip.ts
index b6fdf2fb15..9ab8fc8e8f 100644
--- a/apps/client/src/services/note_tooltip.ts
+++ b/apps/client/src/services/note_tooltip.ts
@@ -95,7 +95,7 @@ async function mouseEnterHandler<T>(this: HTMLElement, e: JQuery.TriggeredEvent<
}
const html = `<div class="note-tooltip-content">${content}</div>`;
- const tooltipClass = `tooltip-${ Math.floor(Math.random() * 999_999_999)} ${note?.getColorClass()}`;
+ const tooltipClass = `tooltip-${Math.floor(Math.random() * 999_999_999)}${note ? ` ${note.getColorClass()}` : ""}`;
// we need to check if we're still hovering over the element
// since the operation to get tooltip content was async, it is possible that