Skip to content

fix: Prevent multiple executions of db.onChanged callback#92

Open
braladin wants to merge 1 commit intosawhney17:mainfrom
braladin:main
Open

fix: Prevent multiple executions of db.onChanged callback#92
braladin wants to merge 1 commit intosawhney17:mainfrom
braladin:main

Conversation

@braladin
Copy link
Copy Markdown

@braladin braladin commented Apr 6, 2025

Issue

When we change a block, logseq.DB.onChanged gets called multiple (3) times.

Solution

This commit adds a guard clause to prevent executing the callback function multiple times for a single block change.

When we change a block, multiple events get triggered and
logseq.DB.onChanged gets called multiple
(3) times.
This commit adds a guard clause to prevent executing the callback function multiple times.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant