Skip to content

Commit dedae1e

Browse files
authored
fix: avoid zalgo when calling down to publish messages (#1710)
1 parent 2b90f2c commit dedae1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/publisher/message-queues.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ export abstract class MessageQueue extends EventEmitter {
102102
};
103103
if (messages.length === 0) {
104104
if (typeof callback === 'function') {
105-
callback(null);
105+
// Do this on the next tick to avoid Zalgo with the publish request below.
106+
process.nextTick(() => callback(null));
106107
}
107108
return;
108109
}

0 commit comments

Comments
 (0)