From 47971b589773eb35ac706502ce5e4385eeee0733 Mon Sep 17 00:00:00 2001 From: "vladimir%pobox.com" Date: Mon, 23 May 2005 21:18:37 +0000 Subject: [PATCH] unknown property access on objects doesn't throw exceptions --- calendar/resources/content/calendarUtils.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/calendar/resources/content/calendarUtils.js b/calendar/resources/content/calendarUtils.js index b321693c414..4b4861824c9 100644 --- a/calendar/resources/content/calendarUtils.js +++ b/calendar/resources/content/calendarUtils.js @@ -188,9 +188,10 @@ function guessSystemTimezone() dump("Guessing system timezone:\n"); dump("offset : " + offset + "\ntimezone: " + timezone + "\n"); - try { - return tzTable[offset + " " + timezone]; - } catch(ex) { + var tzindex = offset + " " + timezone; + if (tzindex in tzTable) { + return tzTable[tzindex]; + } else { // XXX we don't really have a better option here return "floating"; }