Skip to content

Commit

Permalink
don't do anything in private mode / no localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
samthor committed Jun 24, 2016
1 parent 7b3aa6b commit d9d05f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pwacompat.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
'use strict';

(function() {
if (navigator.serviceWorker) { return; }
// we have serviceWorker, or no localStorage (not supported, or in private mode): fail out
if (navigator.serviceWorker || !window.localStorage) { return; }

const storageKey = 'progressr.js';
const manifestEl = document.head.querySelector('link[rel="manifest"]');
Expand Down

0 comments on commit d9d05f0

Please sign in to comment.