Closed Bug 350094 Opened 18 years ago Closed 18 years ago
Changing 'Weeks in view' pref causes JS error if Multiweek view was not shown before
Changing 'Weeks in view' pref causes JS error if Multiweek view was not shown before Steps to Reproduce: 1. Start Sunbird and switch to Day, Week or Month view 2. Restart Sunbird 3. Open preferences and change setting for 'Default Weeks to show' Actual Results: Error: aDate has no properties Source File: chrome://calendar/content/calendar-decorated-multiweek-view.xml Line: 175 Except the error message there is no problem. Expected Results: No error message. Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060824 Calendar/0.3a2+
The pref change calls calDecWeekViewPrefChange() that calls the setter of weeksInView. The setter calls goToDay() that will fail if we're not initialized. This patch adds a simple sanity check. Similar check is done in other places before calling goToDay(), e.g. in calDecWeekViewPrefChange() for other prefs.
Comment on attachment 235294 [details] [diff] [review] Don't refresh if we're not initialized r1/r2=jminta
patch checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
VERIFIED with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060901 Calendar/0.3a2+
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.