diff --git a/apps/web/core/components/inbox/content/issue-root.tsx b/apps/web/core/components/inbox/content/issue-root.tsx index 51531cb7c..f1f7c7d9d 100644 --- a/apps/web/core/components/inbox/content/issue-root.tsx +++ b/apps/web/core/components/inbox/content/issue-root.tsx @@ -191,7 +191,7 @@ export const InboxIssueMainContent: React.FC = observer((props) => { containerClassName="-ml-3" /> - {loader === "issue-loading" ? ( + {loader === "issue-loading" || issue.description_html === undefined ? ( ) : ( ({ // If not synced, the listener will be registered in the plugin // and handled there with proper cleanup } else { - return createIdsForView(this.editor.view, this.options); + createIdsForView(this.editor.view, this.options); } }, diff --git a/packages/editor/src/core/extensions/unique-id/utils.ts b/packages/editor/src/core/extensions/unique-id/utils.ts index 044a9dcea..617ff5dc6 100644 --- a/packages/editor/src/core/extensions/unique-id/utils.ts +++ b/packages/editor/src/core/extensions/unique-id/utils.ts @@ -10,6 +10,13 @@ export const createIdsForView = (view: EditorView, options: UniqueIDOptions) => const { state } = view; const { tr, doc } = state; const { types, attributeName, generateUniqueID } = options; + + // size > 2 means more than just the default empty paragraph + const hasContent = doc.content.size > 2; + if (!hasContent) { + return; + } + const nodesWithoutId = findChildren( doc, (node) => types.includes(node.type.name) && node.attrs[attributeName] === null