Skip to content

Commit 9d23c5a

Browse files
committed
Remove chalk in log due to JSON error
1 parent 5b25bc6 commit 9d23c5a

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/Event.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const subscribe = (...args) => {
3939
const type = args.join(".");
4040
const id = uuid();
4141

42-
console.debug(chalk[typeColor(type)]("react-event", "subscribe", type, id));
42+
console.debug("react-event", "subscribe", type, id);
4343

4444
if (!subscriptions[type]) {
4545
subscriptions[type] = {};
@@ -50,9 +50,7 @@ const subscribe = (...args) => {
5050
type,
5151
callback,
5252
unsubscribe: () => {
53-
console.debug(
54-
chalk[typeColor(type)]("react-event", "unsubscribe", type, id)
55-
);
53+
console.debug("react-event", "unsubscribe", type, id);
5654
delete subscriptions[type][id];
5755

5856
if (Object.keys(subscriptions[type]).length === 0) {
@@ -80,14 +78,7 @@ const publish = (...args) => {
8078
const payload = args.pop();
8179
const type = args.join(".");
8280

83-
console.log(
84-
chalk[typeColor(type)](
85-
"react-event",
86-
"publish",
87-
type,
88-
JSON.stringify(payload)
89-
)
90-
);
81+
console.log("react-event", "publish", type, payload);
9182
messages.set(type, payload);
9283

9384
Object.keys(subscriptions[type] || {}).forEach((key) => {

0 commit comments

Comments
 (0)