fix clubbing same events
This commit is contained in:
parent
52d9a4ebd6
commit
9120ebb7d3
|
@ -438,7 +438,11 @@ export class WatchService {
|
||||||
event.collectionName === this.eventQueue[0].collectionName &&
|
event.collectionName === this.eventQueue[0].collectionName &&
|
||||||
event.type === this.eventQueue[0].type
|
event.type === this.eventQueue[0].type
|
||||||
) {
|
) {
|
||||||
|
if (event.type === 'trash') {
|
||||||
event.paths = [...event.paths, ...this.eventQueue[0].paths];
|
event.paths = [...event.paths, ...this.eventQueue[0].paths];
|
||||||
|
} else {
|
||||||
|
event.files = [...event.files, ...this.eventQueue[0].files];
|
||||||
|
}
|
||||||
this.eventQueue.shift();
|
this.eventQueue.shift();
|
||||||
}
|
}
|
||||||
return event;
|
return event;
|
||||||
|
|
Loading…
Reference in a new issue