Fix HTML dataset extra files 404 in preview

The switch from srcdoc to iframe src (d3b31b0554) broke HTML datasets
that reference extra files via relative paths (JBrowse2, FastQC, etc).
Without a trailing slash on the display URL, the browser resolves
relative paths against /datasets/{id}/ instead of /datasets/{id}/display/,
so sub-resources like static/js/main.js hit routes that don't exist.
Adding the trailing slash fixes resolution and matches the existing
pattern in HistoryDatasetDisplay.vue.
This commit is contained in:
Dannon Baker
2026-03-03 21:30:02 -05:00
parent 04b8f21932
commit 30a14c5687
@@ -37,7 +37,7 @@ const sanitizedToolId = ref<string | null>(null);
const { isAdmin } = storeToRefs(useUserStore());
const dataset = computed(() => getDataset(props.datasetId));
const datasetUrl = computed(() => `/datasets/${props.datasetId}/display`);
const datasetUrl = computed(() => `/datasets/${props.datasetId}/display/`);
const downloadUrl = computed(() => withPrefix(`${datasetUrl.value}?to_ext=${dataset.value?.file_ext}`));
const isLoading = computed(() => isLoadingDataset(props.datasetId));
const previewUrl = computed(() => `${datasetUrl.value}?preview=True`);