1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-02 06:32:07 +02:00

fix: last timeout in queueTrigger() never clears map (#7964)

This commit is contained in:
Grzegorz Blaszczyk 2022-10-21 00:10:50 +02:00 committed by GitHub
parent b58a2201c4
commit e49286a81c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,6 +196,7 @@ EventTarget.prototype.queueTrigger = function(event) {
window.clearTimeout(oldTimeout);
const timeout = window.setTimeout(() => {
map.delete(type);
// if we cleared out all timeouts for the current target, delete its map
if (map.size === 0) {
map = null;