#bufferChanges() → #bufferEvents().
This commit is contained in:
parent
0303558ae1
commit
45441653f6
@ -26,7 +26,7 @@ export default class Collection extends EventEmitter {
|
|||||||
this._size = 0
|
this._size = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
bufferChanges () {
|
bufferEvents () {
|
||||||
++this._buffering
|
++this._buffering
|
||||||
|
|
||||||
let called = false
|
let called = false
|
||||||
@ -64,7 +64,9 @@ export default class Collection extends EventEmitter {
|
|||||||
|
|
||||||
_touch (action, key) {
|
_touch (action, key) {
|
||||||
if (this._buffering === 0) {
|
if (this._buffering === 0) {
|
||||||
process.nextTick(this.bufferChanges())
|
const flush = this.bufferEvents()
|
||||||
|
|
||||||
|
process.nextTick(flush)
|
||||||
}
|
}
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'add':
|
case 'add':
|
||||||
|
Loading…
Reference in New Issue
Block a user