Skip to content

Commit 4f756f6

Browse files
sethyuanTankCool
authored andcommitted
fix: correct page detection
1 parent 9e0993c commit 4f756f6

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ async function openRandomNote() {
5454
const pages = ret?.flat();
5555
for (let i = 0; i < pages.length; i++) {
5656
const block = pages[i];
57-
if (
58-
block.parent && block.page &&
59-
block.parent?.id === block.page?.id &&
60-
(await logseq.Editor.getPreviousSiblingBlock(block.uuid)) == null
61-
) {
57+
if (block["pre-block?"]) {
6258
pages[i] = await logseq.Editor.getPage(block.page.id);
6359
}
6460
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "logseq-random-note",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"author": "TankCool",
55
"main": "dist/index.html",
66
"description": "Random walk through your Logseq notes.",

0 commit comments

Comments
 (0)