diff options
Diffstat (limited to 'src/services/CommentService.ts')
-rw-r--r-- | src/services/CommentService.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/CommentService.ts b/src/services/CommentService.ts index 910f4fa6..f5583ac0 100644 --- a/src/services/CommentService.ts +++ b/src/services/CommentService.ts @@ -136,7 +136,7 @@ export const deleteComment = async (id: string, isThread: boolean) => { export const handleLikeUnlikeComment = async (comment: CommentBaseType) => { try { const token = await AsyncStorage.getItem('token'); - if (comment.user_reaction !== undefined) { + if (comment.user_reaction !== null) { // unlike a comment const url = COMMENT_REACTIONS_ENDPOINT + `${comment.user_reaction.id}/`; const response = await fetch(url, { |