Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #1913 from metacpan/haarg/fix-missing-localstorage
fix js errors when localStorage missing
  • Loading branch information
mickeyn committed Jun 12, 2017
2 parents 5cce45b + eec3b11 commit 27ac513
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 27ac513

Please sign in to comment.