From 61acd39be1f4de518862d07ff5de190a011a5be4 Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 Date: Thu, 3 Aug 2023 23:37:37 -0400 Subject: [PATCH] Slight refactor --- src/shared/components/post/post.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/post/post.tsx b/src/shared/components/post/post.tsx index 9651a17f..b6ce7460 100644 --- a/src/shared/components/post/post.tsx +++ b/src/shared/components/post/post.tsx @@ -234,8 +234,8 @@ export class Post extends Component { }: InitialFetchRequest): Promise { const pathSplit = path.split("/"); - const id = pathSplit.at(2) ? Number(pathSplit.at(2)) : undefined; - const comment_id = pathSplit.at(4) ? Number(pathSplit.at(4)) : undefined; + const id = getIdFromString(pathSplit.at(2)); + const comment_id = getIdFromString(pathSplit.at(4)); const postForm: GetPost = { auth,