Skip to content

Commit 03aec33

Browse files
authored
Merge 8c4f5a6 into a4a1513
2 parents a4a1513 + 8c4f5a6 commit 03aec33

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/publisher/message-queues.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ export abstract class MessageQueue extends EventEmitter {
7474
topic: topic.name,
7575
messages,
7676
};
77+
if (messages.length === 0) {
78+
if (typeof callback === 'function') {
79+
callback(null);
80+
}
81+
return;
82+
}
7783

7884
topic.request<google.pubsub.v1.IPublishResponse>(
7985
{

0 commit comments

Comments
 (0)