diff --git a/frontend/src/views/creators/AboutCreator.vue b/frontend/src/views/creators/AboutCreator.vue index 44156ee..7e08936 100644 --- a/frontend/src/views/creators/AboutCreator.vue +++ b/frontend/src/views/creators/AboutCreator.vue @@ -156,7 +156,7 @@ const videoUrlError = ref(""); // Computed property to check if there are images const hasImages = computed(() => { // Only consider it has images if there are actual image URLs (not empty strings) - return imageUrls.value.some(img => img && img.trim() !== ""); + return imageUrls.value.length > 0 && imageUrls.value.some(img => img && img.trim() !== ""); }); // Computed property for YouTube embed URL @@ -215,15 +215,15 @@ async function fetchAlbumData() { // Extract photo URLs from the album photos imageUrls.value = response.data.photos.map(photo => photo.photoUrl); } else { - // Initialize with empty slots for adding new photos - imageUrls.value = Array(6).fill(""); + // Initialize with empty array instead of empty slots + imageUrls.value = []; originalPhotos.value = []; } } catch (error) { // Album might not exist yet, which is fine console.log("Album might not exist yet:", error); - // Initialize with empty slots for adding new photos - imageUrls.value = Array(6).fill(""); + // Initialize with empty array instead of empty slots + imageUrls.value = []; originalPhotos.value = []; } }