Skip to content
Snippets Groups Projects
Commit 0984554a authored by Allen Gilliland's avatar Allen Gilliland
Browse files

fix logic around setting card.display so that we ensure we always have a valid...

fix logic around setting card.display so that we ensure we always have a valid value.  previous code had a condition where a failed card query would result in setting the card.display to null.
parent 7af7c45a
No related branches found
No related tags found
No related merge requests found
......@@ -711,7 +711,10 @@ CardControllers.controller('CardDetail', [
updateAvailableDisplayTypes(result);
var display = $scope.card.display;
if (typeof display === 'undefined' || display === 'none' || (!$scope.displayTypes[display].available)) {
$scope.card.display = getDefaultDisplayType($scope.displayTypes, result);
var new_display = getDefaultDisplayType($scope.displayTypes, result);
if (new_display) {
$scope.card.display = new_display;
}
} else {
assignColumns(result);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment