fix(examples): hide "undefined" domain in HN example (#4643)

* fix(examples): hide "undefined" domain in HN example

This commit introduces a null-undefined check against the domain of the HN items in the Hacker News example.

* Update site/content/examples/21-miscellaneous/01-hacker-news/Item.svelte

Co-Authored-By: Antony Jones <ant@enzy.org>

Co-authored-by: Antony Jones <ant@enzy.org>
pull/7738/head
Robin Cussol 6 years ago committed by GitHub
parent 20c052f4de
commit 583237b95b

@ -28,7 +28,9 @@
<article>
<a href="{url}">
<h1>{item.title}</h1>
{#if item.domain}
<small>{item.domain}</small>
{/if}
</a>
<p class="meta">submitted by {item.user} {item.time_ago}

Loading…
Cancel
Save