diff --git a/src/components/DataBrowser.vue b/src/components/DataBrowser.vue index 5db78edce..912f37490 100644 --- a/src/components/DataBrowser.vue +++ b/src/components/DataBrowser.vue @@ -65,8 +65,9 @@ export default defineComponent({ } }); + const openDicomWeb = computed(() => dicomWeb.isConfigured); watch( - computed(() => dicomWeb.isConfigured), + openDicomWeb, (configured) => { if (configured) { panels.value.push(DICOM_WEB_KEY); @@ -74,7 +75,8 @@ export default defineComponent({ // Remove from panels to avoid error in vuetify group.ts removeFromArray(panels.value, DICOM_WEB_KEY); } - } + }, + { immediate: true } ); watch( diff --git a/src/store/dicom-web/dicom-web-store.ts b/src/store/dicom-web/dicom-web-store.ts index a51c8bb2b..acbd0c56d 100644 --- a/src/store/dicom-web/dicom-web-store.ts +++ b/src/store/dicom-web/dicom-web-store.ts @@ -191,9 +191,8 @@ export const useDicomWebStore = defineStore('dicom-web', () => { if (!loadResult) { throw new Error('Did not receive a load result'); } - - if (!loadResult.ok) { - throw loadResult.errors[0].cause; + if (loadResult.type === 'error') { + throw loadResult.error; } const selection = convertSuccessResultToDataSelection(loadResult);