From 248bf222eb655d109c566b948ae3c6853bc29bc7 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Wed, 27 Mar 2024 09:57:44 -0400 Subject: [PATCH] Fix miscinfo 'how to fix this' always showing --- .../Content/Dataset/DatasetMiscInfo.vue | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/client/src/components/History/Content/Dataset/DatasetMiscInfo.vue b/client/src/components/History/Content/Dataset/DatasetMiscInfo.vue index fa2237117737..ae8845b98da3 100644 --- a/client/src/components/History/Content/Dataset/DatasetMiscInfo.vue +++ b/client/src/components/History/Content/Dataset/DatasetMiscInfo.vue @@ -16,21 +16,21 @@ const knownErrors = [{ regex: sharingErrorRex, modalRef: sharingError }]; const props = defineProps(); const fixable = computed(() => { - return true; + // Assume the intent is to branch this out to other types of errors, so + // leaving the computed in. + return sharingError.value; }); -watch( - props, - () => { - for (const knownError of knownErrors) { - const regex = knownError.regex; - if (props.miscInfo.match(regex)) { - knownError.modalRef.value = true; - } +function checkForKnownErrors() { + for (const knownError of knownErrors) { + const regex = knownError.regex; + if (props.miscInfo.match(regex)) { + knownError.modalRef.value = true; } - }, - { immediate: true } -); + } +} + +watch(props, checkForKnownErrors, { immediate: true }); function showHelp() { showErrorHelp.value = true;