Skip to content

Commit

Permalink
fix js errors when localStorage missing
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Jun 11, 2017
1 parent 5cce45b commit eec3b11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion root/static/js/cpan.js
Expand Up @@ -8,7 +8,8 @@ MetaCPAN.favs_to_check = {};
// provide localStorage shim to work around https://bugzilla.mozilla.org/show_bug.cgi?id=748620
try {
MetaCPAN.storage = window.localStorage;
} catch (e) {
} catch (e) {}
if (!MetaCPAN.storage) {
MetaCPAN.storage = {
getItem: function(k) {
return this["_" + k];
Expand Down

0 comments on commit eec3b11

Please sign in to comment.