Closed mechanarchy closed 1 year ago
A quick look at the code suggests the Entrypoints:runActiveNoteCommand
function is where a change should be made:
https://github.com/zadam/trilium/blob/6f16b4caeca3073de17527d3ebcf0283a1782464/src/public/app/components/entrypoints.js#L170-L173
By forcing another save using a command like this: https://github.com/zadam/trilium/blob/6f16b4caeca3073de17527d3ebcf0283a1782464/src/public/app/widgets/note_detail.js#L86
But I'm not sure about the cleanest way of doing it.
fixed
Trilium Version
0.59.4
What operating system are you using?
macOS
What is your setup?
Server access only
Operating System Version
macOS Monterey 12.6.3
Description
A race condition exists in the SQL console, between changes being pushed to the backend, and the request for a query to be executed.
This mostly happens when I am actively modifying the query and then quickly press Ctrl+Enter. In the screenshots below, I:
SELECT ''
and wait for the note to be savedasd
into the single quotes, and then quickly press Ctrl+Enter''
and not'asd'
as expected.Looking at the request timeline in developer tools, it is clear the race condition is present:
Error logs
No response