From: Michael Prager Date: Sat, 28 May 2011 13:45:00 +0000 (+0200) Subject: don't break widget when a system backup is made X-Git-Url: https://code.delx.au/comingnext/commitdiff_plain/d187fbd693270152f9ec96eceaaa3573738208bf don't break widget when a system backup is made --- diff --git a/Readme.txt b/Readme.txt index bfebfaf..2b4b978 100644 --- a/Readme.txt +++ b/Readme.txt @@ -277,3 +277,4 @@ Changelog: 1.33 () by Michael Prager - updated included "Skin Fetcher" tool to version 1.4 (now properly supports N8, E7, C6, C6-01, C7 and X7) + - don't break widget when a system backup is made diff --git a/comingNext/index.html b/comingNext/index.html index 8bb8ab3..518c31d 100644 --- a/comingNext/index.html +++ b/comingNext/index.html @@ -541,6 +541,16 @@ function updateData() // check if we got additional or less calendars since our last update var newCalendarList = listCalendars(); + if (newCalendarList == null) { + // Something went wrong fetching the calendars list. + // This usually happens when a backup is being made. + // Retry the next time updateData() is called by + // resetting errorOccured + log('updateData(): listCalendars() failed, trying again laster...'); + cacheEntriesHtml = ''; // make sure we replace the currently shown error message on the next update + errorOccured = false; + return; + } if (newCalendarList.length != calendarList.length) { calendarList = newCalendarList; updateCalendarColors();