1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-23 02:04:34 +02:00
Commit Graph

1 Commits

Author SHA1 Message Date
BrainCrumbz
6221a8f078
fix(middleware): cache grows even if no middleware created (#8674)
## Description
See issue #8653 

## Specific Changes proposed
When in `middleware.js` the function `clearCacheForPlayer` runs, before
setting a value to null in middlware caches, it checks if the key exists
in the first place.

## Requirements Checklist
- [x] Feature implemented / Bug fixed
- [x] If necessary, more likely in a feature request than a bug fix
- [x] Change has been verified in an actual browser (Chrome, Firefox,
IE)
  - [ ] Unit Tests updated or fixed
  - [ ] Docs/guides updated
- [x] Example created ([starter template on
JSBin](https://codepen.io/gkatsev/pen/GwZegv?editors=1000#0))
- [ ] Reviewed by Two Core Contributors

---------

Co-authored-by: Giuseppe Piscopo <g.piscopo@braincrumbz.com>
Co-authored-by: mister-ben <git@misterben.me>
2024-07-06 07:44:37 +01:00