Skip to content

Commit

Permalink
Refine null check and update issue title rendering
Browse files Browse the repository at this point in the history
Updated the null check in hocuspocus-server.js to ensure commentRaw property exists within the comment object before proceeding. Also, modified how the issue title is being rendered in the KanbanBoard Item component, it now directly uses the title from the issueData object.
  • Loading branch information
claygorman committed Dec 27, 2023
1 parent 52aeebe commit 287c395
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/src/services/hocuspocus-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const hocuspocusServer = Server.configure({
},
});

if (!comment) resolve(null);
if (!comment || !comment?.commentRaw) resolve(null);

const commentAsUnit8Array = new Uint8Array(comment.commentRaw);
resolve(commentAsUnit8Array.length === 0 ? null : commentAsUnit8Array);
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/KanbanBoard/Item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const Items = ({ id, title, project }: ItemsType) => {
}
>
<div className='space-y-2'>
<div className='text-sm'>{title}</div>
<div className='text-sm'>{issueData.title}</div>
<div className='max-w-full'>
{issueData?.tags && (
<div className='flex flex-wrap gap-1'>
Expand Down

0 comments on commit 287c395

Please sign in to comment.