Fix silly bug in deferred method queue
This commit is contained in:
parent
42fa5e8d4d
commit
bef3fc5c31
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ export default Class => {
|
||||||
if (typeof prop.value == "function") {
|
if (typeof prop.value == "function") {
|
||||||
Class.queues = new WeakMap()
|
Class.queues = new WeakMap()
|
||||||
Class.prototype[name.slice(1)] = function(...args) {
|
Class.prototype[name.slice(1)] = function(...args) {
|
||||||
const queue = Class.queues.has(this) ? queues.get(this) : []
|
const queue = Class.queues.has(this) ? Class.queues.get(this) : []
|
||||||
if (!queue.length) queueMicrotask(() => {
|
if (!queue.length) queueMicrotask(() => {
|
||||||
this[name](...queue)
|
this[name](...queue)
|
||||||
queue.length = 0
|
queue.length = 0
|
||||||
|
|
Loading…
Reference in a new issue