[Mobile] Browse Controller

Adjusted BrowseController to hide the
back button if current object represented/
selected has no context.
This commit is contained in:
Shivam Dave 2015-08-26 20:20:16 -07:00
parent 6e172359b4
commit a0169ad158

View File

@ -150,9 +150,15 @@ define(
} }
function checkRoot() { function checkRoot() {
var parent = navigationService.getNavigation().getCapability('context').getParent(); var context = navigationService.getNavigation().getCapability('context'),
if (parent.getId() !== ROOT_ID) { parent;
$scope.atRoot = false; if (context) {
parent = context.getParent();
if (parent.getId() !== ROOT_ID) {
$scope.atRoot = false;
} else {
$scope.atRoot = true;
}
} else { } else {
$scope.atRoot = true; $scope.atRoot = true;
} }