fixed appCache.update error.

InvalidStateError: Failed to execute 'update' on 'ApplicationCache': there is no application cache to update.
This commit is contained in:
softcup 2014-03-28 11:52:11 +08:00
parent ead7679566
commit a3b4e2709d

View File

@ -31,7 +31,11 @@
scheduleUpdate = function (delay) { scheduleUpdate = function (delay) {
clearTimeout(updateTimeout); clearTimeout(updateTimeout);
updateTimeout = setTimeout(function () { updateTimeout = setTimeout(function () {
appCache.update(); try {
appCache.update();
} catch (ex) {
console.log('appCache.update: ' + ex);
}
}, delay || 300000); }, delay || 300000);
}, },
attach = function () { attach = function () {