Skip to content

Commit

Permalink
[release-2.10] fix: resolve the issue of occasional blank annotation …
Browse files Browse the repository at this point in the history
…and error occurrences (#4774)

This is an automated cherry-pick of #4772

/assign ruibaby

```release-note
解决文章设置中可能出现空白元数据的问题
```
  • Loading branch information
halo-dev-bot authored Oct 26, 2023
1 parent f019cc9 commit 0be5e7b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion console/src/components/form/AnnotationsForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,15 @@ const handleProcessCustomAnnotations = () => {
value,
};
}
return {
key: "",
value: "",
};
})
.filter((item) => item) as { key: string; value: string }[];
.filter((item) => item.key)
.filter(
(item, index, self) => self.findIndex((t) => t.key === item.key) === index
);
annotations.value = formSchemas
.map((item) => {
Expand Down

0 comments on commit 0be5e7b

Please sign in to comment.