fix: post editor

pull/879/head
Ryan Wang 2023-02-23 17:46:11 +08:00
parent 673da3208e
commit f39c540a1d
3 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ const label = computed(() => {
props.category.metadata.name
);
return categories
.map((category: CategoryTree) => category.spec.displayName)
?.map((category: CategoryTree) => category.spec.displayName)
.join(" / ");
});
</script>

View File

@ -33,7 +33,7 @@ const label = computed(() => {
props.category.metadata.name
);
return categories
.map((category: CategoryTree) => category.spec.displayName)
?.map((category: CategoryTree) => category.spec.displayName)
.join(" / ");
});
</script>

View File

@ -126,7 +126,7 @@ export const getCategoryPath = (
categories: CategoryTree[],
name: string,
path: CategoryTree[] = []
) => {
): CategoryTree[] | undefined => {
for (const category of categories) {
if (category.metadata && category.metadata.name === name) {
return path.concat([category]);