update card layouts

This commit is contained in:
Luke Pulverenti 2016-12-01 12:38:13 -05:00
parent 99ae92bad7
commit 3a7fbb7777
14 changed files with 155 additions and 58 deletions

View file

@ -6,7 +6,10 @@
var localData;
function updateCache() {
cache.put('data', new Response(JSON.stringify(localData)));
if (cache) {
cache.put('data', new Response(JSON.stringify(localData)));
}
}
myStore.setItem = function (name, value) {
@ -38,10 +41,13 @@
try {
caches.open('embydata').then(function (result) {
cache = result;
localData = {};
});
if (self.caches) {
caches.open('embydata').then(function (result) {
cache = result;
localData = {};
});
}
} catch (err) {
console.log('Error opening cache: ' + err);