Skip to content

Commit

Permalink
Fix miscinfo 'how to fix this' always showing
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Mar 27, 2024
1 parent f5e07b1 commit 248bf22
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions client/src/components/History/Content/Dataset/DatasetMiscInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ const knownErrors = [{ regex: sharingErrorRex, modalRef: sharingError }];
const props = defineProps<Props>();
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;
Expand Down

0 comments on commit 248bf22

Please sign in to comment.