mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 22:35:50 +01:00
make sure the CLS entity changes are cleared after roll backed transaction, #1736
This commit is contained in:
@@ -44,10 +44,14 @@ function isEntityEventsDisabled() {
|
||||
return !!namespace.get('disableEntityEvents');
|
||||
}
|
||||
|
||||
function clearEntityChanges() {
|
||||
namespace.set('entityChanges', []);
|
||||
}
|
||||
|
||||
function getAndClearEntityChanges() {
|
||||
const entityChanges = namespace.get('entityChanges') || [];
|
||||
|
||||
namespace.set('entityChanges', []);
|
||||
clearEntityChanges();
|
||||
|
||||
return entityChanges;
|
||||
}
|
||||
@@ -92,6 +96,7 @@ module.exports = {
|
||||
disableEntityEvents,
|
||||
isEntityEventsDisabled,
|
||||
reset,
|
||||
clearEntityChanges,
|
||||
getAndClearEntityChanges,
|
||||
addEntityChange,
|
||||
getEntityFromCache,
|
||||
|
||||
Reference in New Issue
Block a user