fix: edit course when no tags added

This commit is contained in:
Jannat Patel
2024-04-22 16:50:10 +05:30
parent d2491b81c0
commit dbe236f75e

View File

@@ -105,7 +105,7 @@
</div>
<div class="flex items-center">
<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"
>
{{ tag }}
@@ -297,12 +297,6 @@ const imageResource = createResource({
},
})
const getTags = computed(() => {
return courseResource.doc?.tags
? courseResource.doc.tags.split(', ')
: tags.value?.split(', ')
})
const submitCourse = () => {
if (courseResource.data) {
courseEditResource.submit(