Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit f77a29d

Browse files
committed
fix(note_tooltip): redundant padding on empty note with no children
1 parent 9d097a0 commit f77a29d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/public/app/services/content_renderer.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,16 @@ async function renderMermaid(note: FNote, $renderedContent: JQuery<HTMLElement>)
238238
* @param {FNote} note
239239
* @returns {Promise<void>}
240240
*/
241-
async function renderChildrenList($renderedContent: JQuery<HTMLElement>, note: FNote) {
241+
async function renderChildrenList($renderedContent: JQuery<HTMLElement>, note: FNote) {
242+
let childNoteIds = note.getChildNoteIds();
243+
244+
if (!childNoteIds.length) {
245+
return;
246+
}
247+
242248
$renderedContent.css("padding", "10px");
243249
$renderedContent.addClass("text-with-ellipsis");
244250

245-
let childNoteIds = note.getChildNoteIds();
246-
247251
if (childNoteIds.length > 10) {
248252
childNoteIds = childNoteIds.slice(0, 10);
249253
}

0 commit comments

Comments
 (0)