Skip to content

Commit

Permalink
Skip relaying key through emitter
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jan 3, 2024
1 parent 3281aef commit 3d758ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ class Observer {
}
}

// Relay node submitted events such as insert, update, delete to emitter and emit
obj.events.emit('event', data.toString());
if (!data.toString().includes("Key:")) { // Skip relaying key as evt
// Relay node submitted events such as insert, update, delete to emitter and emit
obj.events.emit('event', data.toString());
}
});

});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cursusdb-observer-node",
"version": "1.0.3",
"version": "1.0.4",
"description": "CursusDB Observer for Node.JS",
"main": "main.js",
"type": "module",
Expand Down

0 comments on commit 3d758ad

Please sign in to comment.