Skip to content

Commit

Permalink
fix reviewing your own level bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sspenst committed May 29, 2024
1 parent 057f1f9 commit 89c5bb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/level/reviews/reviewForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default function ReviewForm({ inModal, review }: ReviewFormProps) {
);
}

const authorId = levelContext?.level.archivedBy?.toString() ?? levelContext?.level.userId._id.toString();
const authorId = levelContext?.level.archivedBy?._id?.toString() ?? levelContext?.level.userId._id.toString();
const isOwnLevel = authorId === user._id.toString();

return (
Expand Down

0 comments on commit 89c5bb8

Please sign in to comment.