sdk: only send events if we have any
This commit is contained in:
@@ -111,9 +111,12 @@ class Batcher<T extends any> {
|
|||||||
if(this.timer) {
|
if(this.timer) {
|
||||||
clearTimeout(this.timer)
|
clearTimeout(this.timer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.queue.length > 0) {
|
||||||
this.callback(this.queue)
|
this.callback(this.queue)
|
||||||
this.queue = []
|
this.queue = []
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Mixan {
|
export class Mixan {
|
||||||
|
|||||||
Reference in New Issue
Block a user