check against null instead of undefined,

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-04-15 08:41:53 -06:00
parent de85ba984c
commit a66538a7db

View File

@@ -44,7 +44,7 @@ function getSelectedMetrics() {
var selectedMetricCheckBoxes = sessionStorage.getItem("selectedMetricCheckBoxes");
var yearMetric = sessionStorage.getItem("yearMetric");
var reminderMetric = sessionStorage.getItem("reminderMetric");
if (selectedMetricCheckBoxes != undefined && yearMetric != undefined && reminderMetric != undefined) {
if (selectedMetricCheckBoxes != null && yearMetric != null && reminderMetric != null) {
selectedMetricCheckBoxes = JSON.parse(selectedMetricCheckBoxes);
$(".reportCheckBox").prop('checked', false);
$("#selectAllExpenseCheck").prop("checked", false);