mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 17:25:52 +01:00
fix sending sync rows via WebSocket after transaction is committed
This commit is contained in:
@@ -33,8 +33,12 @@ function isEntityEventsDisabled() {
|
||||
return !!namespace.get('disableEntityEvents');
|
||||
}
|
||||
|
||||
function getSyncRows() {
|
||||
return namespace.get('syncRows') || [];
|
||||
function getAndClearSyncRows() {
|
||||
const syncRows = namespace.get('syncRows') || [];
|
||||
|
||||
namespace.set('syncRows', []);
|
||||
|
||||
return syncRows;
|
||||
}
|
||||
|
||||
function addSyncRow(syncRow) {
|
||||
@@ -68,7 +72,7 @@ module.exports = {
|
||||
disableEntityEvents,
|
||||
isEntityEventsDisabled,
|
||||
reset,
|
||||
getSyncRows,
|
||||
getAndClearSyncRows,
|
||||
addSyncRow,
|
||||
getEntityFromCache,
|
||||
setEntityToCache
|
||||
|
||||
Reference in New Issue
Block a user