Fixed actor and movie tiles stash breaking page.
This commit is contained in:
		
							parent
							
								
									3fdeddb272
								
							
						
					
					
						commit
						9e8a20494b
					
				| 
						 | 
				
			
			@ -89,9 +89,9 @@ const props = defineProps({
 | 
			
		|||
const pageContext = inject('pageContext');
 | 
			
		||||
const { user } = pageContext;
 | 
			
		||||
const pageStash = pageContext.pageProps.stash;
 | 
			
		||||
const currentStash = pageStash || user?.primaryStash;
 | 
			
		||||
const currentStash = pageStash || pageContext.assets?.primaryStash;
 | 
			
		||||
 | 
			
		||||
const favorited = ref(props.actor.stashes.some((actorStash) => actorStash.id === currentStash.id));
 | 
			
		||||
const favorited = ref(props.actor.stashes.some((actorStash) => actorStash.id === currentStash?.id));
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -140,11 +140,11 @@ const props = defineProps({
 | 
			
		|||
const pageContext = inject('pageContext');
 | 
			
		||||
const user = pageContext.user;
 | 
			
		||||
const pageStash = pageContext.pageProps.stash;
 | 
			
		||||
const currentStash = pageStash || user?.primaryStash;
 | 
			
		||||
const currentStash = pageStash || pageContext.assets?.primaryStash;
 | 
			
		||||
 | 
			
		||||
const currentYear = new Date().getFullYear();
 | 
			
		||||
 | 
			
		||||
const favorited = ref(props.movie.stashes?.some((movieStash) => movieStash.id === currentStash.id));
 | 
			
		||||
const favorited = ref(props.movie.stashes?.some((movieStash) => movieStash.id === currentStash?.id));
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue