Skip to content

Commit

Permalink
populate variant field even if typeahead is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
acoffman committed Sep 2, 2021
1 parent 6349629 commit 0d49ef6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/app/views/suggest/source/SuggestSourceController.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,15 @@
if(!_.isUndefined(req.gene) && _.isObject(req.gene)) {
reqObj.gene_name = req.gene.name;
}
if(!_.isUndefined(req.variant) && _.isObject(req.variant)) {
reqObj.variant_name = req.variant.name;
if(!_.isUndefined(req.variant)) {
if(_.isObject(req.variant)) {
//came from typeahead
reqObj.variant_name = req.variant.name;
} else {
//via form
reqObj.variant_name = req.variant;
}

}
if(!_.isUndefined(req.disease)) {
if(_.isObject(req.disease)) {
Expand Down

0 comments on commit 0d49ef6

Please sign in to comment.