fix crash when links aren't present

This commit is contained in:
Daniel Bulant 2022-09-25 15:15:20 +02:00
parent d30d5bbda1
commit cb8ac1b3a9

View file

@ -252,7 +252,7 @@
} }
let anilistData; let anilistData;
$: anilistData = manga.links.al && anilistInfo(manga.links.al); $: anilistData = manga.links && manga.links.al && anilistInfo(manga.links.al);
var selectedTab = "Chapters"; var selectedTab = "Chapters";
const tabs = ["Chapters", "Art", "More information"]; const tabs = ["Chapters", "Art", "More information"];
@ -440,6 +440,7 @@
{/each} {/each}
</div> </div>
{/if} {/if}
{#if manga.links}
<div> <div>
<h4>Links</h4> <h4>Links</h4>
@ -477,6 +478,7 @@
<a href="{manga.links.engtl}">engtl</a> <br> <a href="{manga.links.engtl}">engtl</a> <br>
{/if} {/if}
</div> </div>
{/if}
</div> </div>
</div> </div>
</SwiperSlide> </SwiperSlide>