summary refs log tree commit diff
path: root/webclient
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-09-01 17:43:14 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-09-01 17:43:27 +0200
commit9b61076d42aa241c2f0766ab2b60c055c9e4abee (patch)
tree9de7353b0079b772e28636f85c34a930237f5561 /webclient
parentmissing semicolon (diff)
downloadsynapse-9b61076d42aa241c2f0766ab2b60c055c9e4abee.tar.xz
BF: Check config exists (=defined in the localstorage) before using it
Diffstat (limited to 'webclient')
-rw-r--r--webclient/app-controller.js8
1 files 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.