Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

chore: add extra check to the version editor (#5521)

Aaryan Khandelwalbd20d71fc41a
diff --git a/web/core/components/pages/version/editor.tsx b/web/core/components/pages/version/editor.tsx
index d176022bc5..56615c7246 100644
--- a/web/core/components/pages/version/editor.tsx
+++ b/web/core/components/pages/version/editor.tsx
@@ -92,12 +92,13 @@ export const PagesVersionEditor: React.FC<Props> = observer((props) => {
</div>
);
+ const description = isCurrentVersionActive ? currentPageDetails.description_html : versionDetails?.description_html;
+ if (description === undefined || description?.trim() === "") return null;
+
return (
<DocumentReadOnlyEditorWithRef
id={activeVersion ?? ""}
- initialValue={
- (isCurrentVersionActive ? currentPageDetails.description_html : versionDetails?.description_html) ?? "<p></p>"
- }
+ initialValue={description ?? "<p></p>"}
containerClassName="p-0 pb-64 border-none"
displayConfig={displayConfig}
editorClassName="pl-10"