Skip to content

Commit

Permalink
localstorage safety net.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Mar 11, 2010
1 parent fd7be18 commit 4260f08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modernizr-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


<script>
document.write('localStorage.getItem("modernizr1.2pre") is: ' + (!!localStorage.getItem('modernizr1.2pre') ? 'PRESENT' : 'EMPTY') + '<br>');
window.localStorage && document.write('localStorage.getItem("modernizr1.2pre") is: ' + (!!localStorage.getItem('modernizr1.2pre') ? 'PRESENT' : 'EMPTY') + '<br>');

var start = +new Date();
</script>
Expand Down Expand Up @@ -79,7 +79,7 @@ <h1>Modernizr</h1>
return;
}

document.write('localStorage.getItem(modernizr'+Modernizr._version+') == ' + localStorage.getItem('modernizr'+Modernizr._version) + '<br>');
window.localStorage && document.write('localStorage.getItem(modernizr'+Modernizr._version+') == ' + localStorage.getItem('modernizr'+Modernizr._version) + '<br>');

for (var prop in Modernizr) {
if (typeof Modernizr[prop] === 'function') continue;
Expand Down

0 comments on commit 4260f08

Please sign in to comment.