[CORD-1858] Avoid event duplication and skipping notification for parent models
Change-Id: I8815de31b0adb731226ae26bedbe3598bde04aca
diff --git a/src/decorators.ts b/src/decorators.ts
index 790293d..ab80a39 100644
--- a/src/decorators.ts
+++ b/src/decorators.ts
@@ -42,11 +42,12 @@
// eg: the first parameter is the group name
const msg = arguments[0];
- if (!isLogEnabled() && msg.indexOf('WebSocket') === 0) {
+
+ if (!isLogEnabled() && msg.indexOf('WebSocket') === -1) {
return;
}
- if (!isEventLogEnabled() && msg.indexOf('WebSocket') > 0) {
+ if (!isEventLogEnabled() && msg.indexOf('WebSocket') > -1) {
return;
}