BF: Check config exists (=defined in the localstorage) before using it

This commit is contained in:
Emmanuel ROHEE 2014-09-01 17:43:14 +02:00
parent b9172b982f
commit 9b61076d42
1 changed files with 6 additions and 2 deletions

View File

@ -36,8 +36,12 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
eventStreamService.resume(); eventStreamService.resume();
mPresence.start(); 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. * Open a given page.