fix: edit course when no tags added
This commit is contained in:
@@ -105,7 +105,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div
|
<div
|
||||||
v-for="tag in course.tags.split(', ')"
|
v-for="tag in course.tags?.split(', ')"
|
||||||
class="flex items-center bg-gray-100 p-2 rounded-md mr-2"
|
class="flex items-center bg-gray-100 p-2 rounded-md mr-2"
|
||||||
>
|
>
|
||||||
{{ tag }}
|
{{ tag }}
|
||||||
@@ -297,12 +297,6 @@ const imageResource = createResource({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const getTags = computed(() => {
|
|
||||||
return courseResource.doc?.tags
|
|
||||||
? courseResource.doc.tags.split(', ')
|
|
||||||
: tags.value?.split(', ')
|
|
||||||
})
|
|
||||||
|
|
||||||
const submitCourse = () => {
|
const submitCourse = () => {
|
||||||
if (courseResource.data) {
|
if (courseResource.data) {
|
||||||
courseEditResource.submit(
|
courseEditResource.submit(
|
||||||
|
|||||||
Reference in New Issue
Block a user