diff --git a/package.json b/package.json index 0729811..8b515da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "logseq-plugin-jump-to-block", - "version": "1.0.2", + "version": "1.0.3", "main": "dist/index.html", "logseq": { "id": "logseq-plugin-jump-to-block" diff --git a/src/components/App.tsx b/src/components/App.tsx index 37a66c4..ffd71f8 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -67,10 +67,15 @@ const makeCommands = ( if (depth > maxDepth) { return; } + const blockContent = (block.content || '').trim(); + // ignore empty blocks + if (blockContent === '') { + return; + } const cmd: Command = { // @ts-expect-error id: block.uuid, - name: '—'.repeat(depth) + ' ' + prepareLabel(block.content), + name: '—'.repeat(depth) + ' ' + prepareLabel(blockContent), command: () => scrollTo(block.uuid), color: 'transparent', path: path,