@@ -215,12 +215,14 @@
{#each leaves as leaf, i}
-
+ {#if leaf}
+
+ {/if}
{/each}
{/if}
@@ -231,7 +233,7 @@
class="flex flex-col p-4 max-w-3xl overflow-auto flex-grow-2 max-h-[calc(100vh-146px)] sticky top-[146px]"
>
{#each leaves as leaf, i}
- {#if leaf.tagAddress() === currentBlog}
+ {#if leaf && leaf.tagAddress() === currentBlog}
@@ -245,7 +247,7 @@
ref={(el) => setLastElementRef(el, i)}
/>
-
+
{/if}
@@ -273,7 +275,7 @@
alternative for other publications and
when blog is not opened, but discussion is opened from the list
-->
- {#if showBlogHeader()}
+ {#if showBlogHeader() && currentBlog && currentBlogEvent}
-
+
{#await Promise.all([leafTitle, leafContent, leafHierarchy, publicationType, divergingBranches])}
{:then [leafTitle, leafContent, leafHierarchy, publicationType, divergingBranches]}
diff --git a/src/lib/components/util/ArticleNav.svelte b/src/lib/components/util/ArticleNav.svelte
index f7cdd29..8665ece 100644
--- a/src/lib/components/util/ArticleNav.svelte
+++ b/src/lib/components/util/ArticleNav.svelte
@@ -40,7 +40,7 @@
function shouldShowBack() {
const vis = $publicationColumnVisibility;
- return ['discussion', 'toc', 'inner'].some(key => vis[key]);
+ return ['discussion', 'toc', 'inner'].some(key => vis[key as keyof typeof vis]);
}
function backToMain() {
@@ -140,7 +140,7 @@
{/if}
{#if publicationType !== 'blog' && !$publicationColumnVisibility.discussion}
-