fix(components): add null check to singleStory.vue
if author is null for some reason, show a static "..." instead of breaking everything
This commit is contained in:
		
							parent
							
								
									f8913e976d
								
							
						
					
					
						commit
						83c1379ba6
					
				| @ -21,9 +21,9 @@ | ||||
| 		<template #title> | ||||
| 			<div style="padding-top: 1em; padding-bottom: 0.8em"> | ||||
| 				<div style="display: flex; justify-content: space-between"> | ||||
| 					<NuxtLink :to="`/story/${story._id}/${idxo + 1}`"> | ||||
| 					<nuxt-link :to="`/story/${story._id}/${idxo + 1}`"> | ||||
| 						{{ story.title }} | ||||
| 					</NuxtLink> | ||||
| 					</nuxt-link> | ||||
| 					<a-tooltip placement="topLeft"> | ||||
| 						<template #title> You'll need to log in to read this story. Register if you don't already have an account -- it's free! </template> | ||||
| 						<icon v-if="!data?.user" istyle="solid" name="lock" /> | ||||
| @ -38,11 +38,12 @@ | ||||
| 						</span> | ||||
| 					</div> | ||||
| 					<span> fic by </span> | ||||
| 					<span> | ||||
| 					<span v-if="story.author"> | ||||
| 						<NuxtLink :to="`/user/${story.author._id}`"> | ||||
| 							{{ story.author.username }} | ||||
| 						</NuxtLink> | ||||
| 					</span> | ||||
| 					<span v-else>...</span> | ||||
| 					<span v-if="story.coAuthor"> | ||||
| 						 and  | ||||
| 						<NuxtLink :to="`/user/${story.coAuthor._id}`"> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user