Skip to content

Commit

Permalink
Merge branch 'release/v1.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
freder committed Mar 23, 2023
2 parents b5ae679 + 28f9c9a commit 4a1562c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
7 changes: 6 additions & 1 deletion src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4a1562c

Please sign in to comment.