From 19058302bd0f58438eb1283e1319dc20606162aa Mon Sep 17 00:00:00 2001 From: Ryo Chikazawa Date: Wed, 11 Feb 2015 11:12:54 -0800 Subject: [PATCH] @chikathreesix fixed an object delete error in Chrome. closes #1858 --- CHANGELOG.md | 1 + src/js/lib.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4943824f1..589f97020 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ CHANGELOG * @mmcc fixed an issue with text track hiding introduced in #1681 ([view](https://github.com/videojs/video.js/pull/1804)) * Export video.js as a named AMD module ([view](https://github.com/videojs/video.js/pull/1844)) * Hide the poster when play fires ([view](https://github.com/videojs/video.js/pull/1834)) +* @chikathreesix fixed an object delete error in Chrome ([view](https://github.com/videojs/video.js/pull/1858)) -------------------- diff --git a/src/js/lib.js b/src/js/lib.js index 47011e552..39f0f31fd 100644 --- a/src/js/lib.js +++ b/src/js/lib.js @@ -245,6 +245,8 @@ vjs.getData = function(el){ var id = el[vjs.expando]; if (!id) { id = el[vjs.expando] = vjs.guid++; + } + if (!vjs.cache[id]) { vjs.cache[id] = {}; } return vjs.cache[id];