Skip to content

Commit

Permalink
https://github.com/Modernizr/Modernizr/issues/423
Browse files Browse the repository at this point in the history
I changed the test for sessionStorage to the same test as for localStorage, 
fixing the issue described in the thread linked above.
  • Loading branch information
Deschtex committed Dec 2, 2011
1 parent 3177e34 commit 22c6779
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,10 @@ window.Modernizr = (function( window, document, undefined ) {

tests['sessionstorage'] = function() {
try {
return !!sessionStorage.getItem;
} catch(e){
sessionStorage.setItem(mod, mod);
sessionStorage.removeItem(mod);
return true;
} catch(e) {
return false;
}
};
Expand Down

0 comments on commit 22c6779

Please sign in to comment.