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

fix localStorage context

This commit is contained in:
Gianluca Guarini 2012-01-31 11:52:26 +01:00
parent 1eda892c86
commit 35eb539d00

View File

@ -266,7 +266,7 @@ _V_.extend({
================================================================================ */
setLocalStorage: function(key, value){
// IE was throwing errors referencing the var anywhere without this
var localStorage = localStorage || false;
var localStorage = window.localStorage || false;
if (!localStorage) { return; }
try {
localStorage[key] = value;