Skip to content

Build your personal knowledge base with Trilium Notes

fix event

zadam758dba9ba547
diff --git a/src/becca/entities/bnote.js b/src/becca/entities/bnote.js
index 657de1e66b..09dd7e6792 100644
--- a/src/becca/entities/bnote.js
+++ b/src/becca/entities/bnote.js
@@ -12,6 +12,7 @@ const TaskContext = require("../../services/task_context");
const dayjs = require("dayjs");
const utc = require('dayjs/plugin/utc');
const eventService = require("../../services/events");
+const cls = require("../../services/cls.js");
dayjs.extend(utc);
const LABEL = 'label';
@@ -316,10 +317,12 @@ class BNote extends AbstractBeccaEntity {
isSynced: true
});
- eventService.emit(eventService.ENTITY_CHANGED, {
- entityName: 'note_contents',
- entity: this
- });
+ if (!cls.isEntityEventsDisabled()) {
+ eventService.emit(eventService.ENTITY_CHANGED, {
+ entityName: 'note_contents',
+ entity: this
+ });
+ }
}
setJsonContent(content) {