Skip to content

Commit

Permalink
fix(genome): Genome would appear as N/A if opened in a new tab.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmussig committed May 17, 2023
1 parent 00aa21c commit 3c85cec
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions pages/genome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,6 @@ export default Vue.extend({
}
},
computed: {
gid(): string {
const gid = this.$route.query.gid;
if (gid) {
return gid as string;
} else {
return 'N/A'
}
},
sourceBadgeText(): string {
if (this.genomeCard.metadata_ncbi) {
if (this.genomeCard.metadata_ncbi.ncbi_genome_category === 'derived from metagenome') {
Expand Down Expand Up @@ -278,6 +270,7 @@ export default Vue.extend({
'$route.query': {
handler(after, before) {
if (before == null || (after && after.gid !== before.gid)) {
this.gid = after.gid;
this.getGenomeCard();
}
},
Expand All @@ -289,6 +282,8 @@ export default Vue.extend({
// Icons
mdiArrowCollapseRightSvg: mdiArrowCollapseRight,
gid: 'Loading...',
// The base model
genomeCard: {} as GenomeCard,
Expand All @@ -311,6 +306,10 @@ export default Vue.extend({
},
mounted() {
// Load the genome ID from the route
//@ts-ignore
this.gid = this.$route.query.gid;
// Load the genome card information
this.getGenomeCard();
Expand Down

0 comments on commit 3c85cec

Please sign in to comment.