Skip to content

Commit

Permalink
fix(ui): don't show the info alert when no info
Browse files Browse the repository at this point in the history
Fixes #5640
  • Loading branch information
loicmathieu committed Oct 24, 2024
1 parent f8f763b commit e84b272
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions ui/src/components/flows/ValidationError.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@
{{ $t("warning detected") }}
</span>
</el-header>
<el-main>{{ warnings.join("\n") }}</el-main>
<el-main v-if="infos">{{ infos.join("\n") }}</el-main>
<el-main>
{{ warnings.join("\n") }}
<br v-if="infos">
{{ infos?.join("\n") }}
</el-main>
</el-container>
</template>
<el-button v-bind="$attrs" :link="link" :size="size" type="default" class="warning">
Expand Down Expand Up @@ -84,7 +87,7 @@
{{ $t("informative notice") }}
</span>
</el-header>
<el-main>{{ infos.join("\n") }}</el-main>
<el-main>{{ infos.join("<\n") }}</el-main>
</el-container>
</template>
<el-button v-bind="$attrs" :link="link" :size="size" type="default" class="info">
Expand Down
3 changes: 2 additions & 1 deletion ui/src/components/inputs/EditorView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@
const flowInfos = computed(() => {
if (isFlow()) {
return props.flowValidation?.infos;
const infos = props.flowValidation?.infos ?? [];
return infos.length === 0 ? undefined : infos;
}
return undefined;
Expand Down

0 comments on commit e84b272

Please sign in to comment.