🏡 index : ~doyle/chartered.git

author Jordan Doyle <jordan@doyle.la> 2022-09-17 3:31:58.0 +01:00:00
committer Jordan Doyle <jordan@doyle.la> 2022-09-17 3:31:58.0 +01:00:00
commit
927620d7e9031e272e94ad113aaddc73dd1e3f16 [patch]
tree
c12fe2afe44e07d6a6ff29fd24c64b8507558b55
parent
d3e0003dab534b072152d7bdecf0bd40644ac068
download
927620d7e9031e272e94ad113aaddc73dd1e3f16.tar.gz

Fix SvelteMarkdown throwing an error when no README is given in crate



Diff

 chartered-frontend/src/routes/(authed)/crates/[organisation]/[crate]/+page.svelte | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/chartered-frontend/src/routes/(authed)/crates/[organisation]/[crate]/+page.svelte b/chartered-frontend/src/routes/(authed)/crates/[organisation]/[crate]/+page.svelte
index aa173ee..947c53d 100644
--- a/chartered-frontend/src/routes/(authed)/crates/[organisation]/[crate]/+page.svelte
+++ a/chartered-frontend/src/routes/(authed)/crates/[organisation]/[crate]/+page.svelte
@@ -186,7 +186,11 @@
                        />
                    {/each}
                {:then crate}
                    <SvelteMarkdown source={crate.readme} />
                    {#if crate.readme}
                        <SvelteMarkdown source={crate.readme} />
                    {:else}
                        <em>No README exists for the current crate version.</em>
                    {/if}
                {/await}
            </article>
        {:else if currentTab === Tab.MEMBERS}