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/4685/head
Robin Cussol 4 years ago committed by GitHub
parent df3ae85b42
commit ece61381de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save