From 93a003749e2c1ad4ac1afbf86cae1862a400273c Mon Sep 17 00:00:00 2001 From: Aditya Bansal Date: Sat, 8 Jul 2017 15:33:17 +0530 Subject: [PATCH] compose.js: Remove dead code from mark_end_to_end_display_time(). This piece was dead because exports.send_times_data[message_id] cannot be undefined since the only place this function is called from is exports.report_as_received() and that function has a call to mark_end_to_end_receive_time() before a call is made to the function in question for dead code. The function call to mark_end_to_end_receive_time results in exports.send_times_data[message_id] = {} if this was not defined already. So there can be no instance where we end up the code being removed. --- static/js/compose.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/static/js/compose.js b/static/js/compose.js index 2570481fb3..c1aa184331 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -236,9 +236,6 @@ function mark_end_to_end_receive_time(message_id) { } function mark_end_to_end_display_time(message_id) { - if (exports.send_times_data[message_id] === undefined) { - exports.send_times_data[message_id] = {}; - } exports.send_times_data[message_id].displayed = new Date(); maybe_report_send_times(message_id); }