From 2e8b9500223c543d45a2c4831e7602a30f2ed754 Mon Sep 17 00:00:00 2001 From: Varun Singh Date: Thu, 21 Mar 2024 01:37:17 +0530 Subject: [PATCH] submessage: Remove redundant 'parseInt' statements. As per 'Submessage' type in 'types.ts' , 'id' field is of type 'number'. Hence we don't need to parse it. --- web/src/submessage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/submessage.js b/web/src/submessage.js index a765d7a293..1559b737cc 100644 --- a/web/src/submessage.js +++ b/web/src/submessage.js @@ -16,7 +16,7 @@ export function get_message_events(message) { return undefined; } - message.submessages.sort((m1, m2) => Number.parseInt(m1.id, 10) - Number.parseInt(m2.id, 10)); + message.submessages.sort((m1, m2) => m1.id - m2.id); const events = message.submessages.map((obj) => ({ sender_id: obj.sender_id,