From 65fcd0b786713fc6c34f05788fa67741e393a73a Mon Sep 17 00:00:00 2001 From: Keerthi Niranjan Date: Thu, 23 Nov 2017 16:05:06 +0530 Subject: [PATCH] SEARCH-480 - Removed a check --- js/search/search.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/search/search.js b/js/search/search.js index 7b824313..278ec61f 100644 --- a/js/search/search.js +++ b/js/search/search.js @@ -254,17 +254,17 @@ class Search { return; } - let sd = new Date().getTime() - SEARCH_PERIOD_SUBTRACTOR; - let sd_time = sd; - if (startDate && startDate !== "") { + let searchPeriod = new Date().getTime() - SEARCH_PERIOD_SUBTRACTOR; + let sd_time = searchPeriod; + if (startDate) { sd_time = new Date(parseInt(startDate, 10)).getTime(); - if (sd_time < sd) { - sd_time = sd; + if (sd_time < searchPeriod) { + sd_time = searchPeriod; } } let ed_time = MAXIMUM_DATE; - if (endDate && endDate !== "") { + if (endDate) { let etime = new Date(parseInt(endDate, 10)).getTime(); if (etime) { ed_time = etime