Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report: Repeat execution. #2522

Open
lalalaleo opened this issue Feb 9, 2025 · 1 comment
Open

Bug report: Repeat execution. #2522

lalalaleo opened this issue Feb 9, 2025 · 1 comment
Labels
bug Something isn't working.

Comments

@lalalaleo
Copy link

What happened?

The code is executed repeatedly, and the example below clearly demonstrates that the code is executed twice.

DQL

No response

JS

// fetch
const res = await fetch("http://localhost:8080/api/hello").then(res => res.text());
dv.span(res);

// or create note
await app.vault.create(`/${Date.now()+Math.random()*100}.md`, "");

Dataview Version

0.5.67

Obsidian Version

1.8.4

OS

MacOS

@lalalaleo lalalaleo added the bug Something isn't working. label Feb 9, 2025
@holroy
Copy link
Collaborator

holroy commented Feb 23, 2025

Whenever a query is changed, the cache somehow is triggered, you reopen the file, or do a rebuild of the current view the query is executed again. This is not a bug, but the expected behaviour of a dynamic query.

What could be considered a bug would be that it sometimes do a double refresh/re-execution after a single change. This can to some extent be mitigated through changing the refresh interval, or turning off automatic refreshes. It'll still run the query after some of the instances like reopening or causing a full rebuild of the view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

2 participants