From 9b61076d42aa241c2f0766ab2b60c055c9e4abee Mon Sep 17 00:00:00 2001 From: Emmanuel ROHEE Date: Mon, 1 Sep 2014 17:43:14 +0200 Subject: BF: Check config exists (=defined in the localstorage) before using it --- webclient/app-controller.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webclient/app-controller.js b/webclient/app-controller.js index 172770f82f..97f799d623 100644 --- a/webclient/app-controller.js +++ b/webclient/app-controller.js @@ -36,8 +36,12 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even eventStreamService.resume(); mPresence.start(); } - - $scope.user_id = matrixService.config().user_id; + + $scope.user_id; + var config = matrixService.config(); + if (config) { + $scope.user_id = matrixService.config().user_id; + } /** * Open a given page. -- cgit 1.4.1