- small bug in dataset-detail.component.ts

This commit is contained in:
Arno Kaimbacher 2023-07-05 22:30:43 +02:00
parent 4f1ea85982
commit 3faf538afd

View File

@ -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);
}