Fix silly bug in deferred method queue

This commit is contained in:
Talia 2022-09-17 09:03:24 +02:00
parent 42fa5e8d4d
commit bef3fc5c31
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -46,7 +46,7 @@ export default Class => {
if (typeof prop.value == "function") {
Class.queues = new WeakMap()
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(() => {
this[name](...queue)
queue.length = 0