From 3faf538afddd96f5867bdd5047e81eb94b3fe616 Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Wed, 5 Jul 2023 22:30:43 +0200 Subject: [PATCH] - small bug in dataset-detail.component.ts --- .../dataset-detail.component/dataset-detail.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/dataset-detail.component/dataset-detail.component.ts b/src/views/dataset-detail.component/dataset-detail.component.ts index b55adc5..d124adc 100644 --- a/src/views/dataset-detail.component/dataset-detail.component.ts +++ b/src/views/dataset-detail.component/dataset-detail.component.ts @@ -21,7 +21,7 @@ import DataMetricsBadge from "@/components/datacite/DataMetricsBadge.vue"; }) export default class DatasetDetailComponent extends Vue { @Prop() - datasetId!: number; + datasetId!: string; // @Prop() // identifier!: string; @@ -43,8 +43,8 @@ export default class DatasetDetailComponent extends Vue { created(): void { dayjs.extend(advancedFormat); - if (typeof this.datasetId === "number") { - this.getDataset(this.datasetId); + if (!isNaN(Number(this.datasetId))) { + this.getDataset(Number(this.datasetId)); } else { this.getDatasetByIdentifier(this.datasetId); }