aboutsummaryrefslogtreecommitdiff
path: root/src/services/CommentService.ts
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-05-10 16:42:09 -0400
committerIvan Chen <ivan@tagg.id>2021-05-10 16:50:42 -0400
commit0e9ec9b6403c1556fc53e895eb16ca477106e48e (patch)
tree610e9b5cb4a52c7bce2dc91fefc3e154b73eed8e /src/services/CommentService.ts
parentc3f7b66e4941d3bc0a0406e46f3b8fce5e01329e (diff)
fixed undefined -> null
Diffstat (limited to 'src/services/CommentService.ts')
-rw-r--r--src/services/CommentService.ts2
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, {