Skip to content

Commit 54480ec

Browse files
catch exceptions from swapCache()
1 parent c1a0f2b commit 54480ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

js/app.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ var loadComplete = function(e) {
4949
clearTimeout(initTimer);
5050

5151
if(e.type == 'updateready') {
52-
window.applicationCache.swapCache();
52+
// swapCache may throw exception if the isn't a previous cache
53+
try {
54+
window.applicationCache.swapCache();
55+
} catch(e) {}
56+
5357
window.location.reload();
5458
return;
5559
}

0 commit comments

Comments
 (0)