Skip to content

Commit

Permalink
fix: last timeout in queueTrigger() never clears map (videojs#7964)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjanblaszczyk authored and edirub committed Jun 8, 2023
1 parent 5e7661e commit f40b8d3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js/event-target.js
Expand Up @@ -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;
Expand Down

0 comments on commit f40b8d3

Please sign in to comment.