diff options
author | Emmanuel ROHEE <erohee@amdocs.com> | 2014-09-01 17:43:14 +0200 |
---|---|---|
committer | Emmanuel ROHEE <erohee@amdocs.com> | 2014-09-01 17:43:27 +0200 |
commit | 9b61076d42aa241c2f0766ab2b60c055c9e4abee (patch) | |
tree | 9de7353b0079b772e28636f85c34a930237f5561 /webclient/app-controller.js | |
parent | missing semicolon (diff) | |
download | synapse-9b61076d42aa241c2f0766ab2b60c055c9e4abee.tar.xz |
BF: Check config exists (=defined in the localstorage) before using it
Diffstat (limited to 'webclient/app-controller.js')
-rw-r--r-- | webclient/app-controller.js | 8 |
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. |