diff --git a/packages/sdk/index.ts b/packages/sdk/index.ts index 4d00d921..851582a6 100644 --- a/packages/sdk/index.ts +++ b/packages/sdk/index.ts @@ -111,8 +111,11 @@ class Batcher { if(this.timer) { clearTimeout(this.timer) } - this.callback(this.queue) - this.queue = [] + + if(this.queue.length > 0) { + this.callback(this.queue) + this.queue = [] + } } }