Check if board is undefined (fixes #366)

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-12-22 12:16:08 +01:00
parent 52ac77ea90
commit 8cec7cb571

View File

@@ -55,7 +55,11 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
}; };
$scope.$watch(function () { $scope.$watch(function () {
if (typeof BoardService.getCurrent() !== 'undefined') {
return BoardService.getCurrent().title; return BoardService.getCurrent().title;
} else {
return null;
}
}, function () { }, function () {
$scope.setPageTitle(); $scope.setPageTitle();
}); });