From 8d66f62cad73bf6095e9ea585d913a45ace4cb07 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 1 Apr 2015 08:51:48 -0400 Subject: [PATCH] [fix] JS syntax error on login page --- UI/SOGoUI/UIxComponent.m | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index 44f59a425..7fbccaa24 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -443,7 +443,16 @@ static SoProduct *commonProduct = nil; - (NSString *) currentDayDescription { - return [[[context activeUser] currentDay] jsonRepresentation]; + NSDictionary *currentDay; + SOGoUser *user; + + user = [context activeUser]; + if (user) + currentDay = [user currentDay]; + else + currentDay = [NSDictionary dictionary]; + + return [currentDay jsonRepresentation]; } - (NSString *) dateStringForDate: (NSCalendarDate *) _date