diff --git a/packages/text-editor/src/components/TextEditorStyleToolbar.svelte b/packages/text-editor/src/components/TextEditorStyleToolbar.svelte
index db70460751..838ed409f2 100644
--- a/packages/text-editor/src/components/TextEditorStyleToolbar.svelte
+++ b/packages/text-editor/src/components/TextEditorStyleToolbar.svelte
@@ -330,16 +330,18 @@
{#if textFormatCategories.length > 0 && textNodeActions.length > 0}
{/if}
- {#each textNodeActions as action}
- {
- dispatch('action', { action: action.id, editor: textEditor })
- }}
- />
- {/each}
+ {#if textNodeActions.length > 0}
+ {#each textNodeActions as action}
+ {
+ dispatch('action', { action: action.id, editor: textEditor })
+ }}
+ />
+ {/each}
+ {/if}
{/if}
diff --git a/packages/text-editor/src/components/toc/TableOfContentsPopup.svelte b/packages/text-editor/src/components/toc/TableOfContentsPopup.svelte
index 69ea5e1152..249bbe2dbe 100644
--- a/packages/text-editor/src/components/toc/TableOfContentsPopup.svelte
+++ b/packages/text-editor/src/components/toc/TableOfContentsPopup.svelte
@@ -36,8 +36,8 @@