Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Commit

Permalink
fixed bug and add comment (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janice Patricia authored and denis-yuen committed Aug 17, 2016
1 parent 75b45f4 commit 8fe0913
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion app/scripts/controllers/containerfileviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,24 @@ angular.module('dockstore.ui')
);
};

/**
* This extracts a list of valid secondary files for a given tool, filtered by the selected tag and descriptor type
* Returns an empty array if there are not valid tags
*/
function extracted(){
return $scope.containerObj.tags.filter(function(a) {return a.name === $scope.selTagName;})[0].sourceFiles.filter(function(a) {return a.type === 'DOCKSTORE_'+$scope.selDescriptorName.toUpperCase();}).map(function(a) {return a.path;}).sort();
if($scope.containerObj.tags.length !==0){
return $scope.containerObj.tags.filter(
function(a) {
return a.name === $scope.selTagName;})[0].sourceFiles.filter(
function(a) {
return a.type === 'DOCKSTORE_'+$scope.selDescriptorName.toUpperCase();}).map(
function(a) {
return a.path;
}).sort();
}else{
return [];
}

}

$scope.setDocument = function() {
Expand Down

0 comments on commit 8fe0913

Please sign in to comment.