diff --git a/src/client/app/managers/state.js b/src/client/app/managers/state.js index 0e46a748..c3b6c009 100644 --- a/src/client/app/managers/state.js +++ b/src/client/app/managers/state.js @@ -21,6 +21,8 @@ var StateManager = class StateManager { this.valueNewPropQueue = {} this.queueCounter = 0 + this.flushTimeout = null + } get(filter) { @@ -230,7 +232,12 @@ var StateManager = class StateManager { decrementQueue() { this.queueCounter-- - if (this.queueCounter == 0) this.flush() + if (this.queueCounter == 0) { + if (this.flushTimeout) clearTimeout(this.flushTimeout) + this.flushTimeout = setTimeout(()=>{ + this.flush() + }) + } } }