Skip to content

Commit

Permalink
BAH-3049 | Deepti,Sweety | Fix. getTime() undefined error
Browse files Browse the repository at this point in the history
  • Loading branch information
deeptirawat1510 committed Dec 1, 2023
1 parent ff389d5 commit 0f34f5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/app/reports/controllers/reportsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ angular.module('bahmni.reports')
$scope.enableReportQueue = appService.getAppDescriptor().getConfigValue("enableReportQueue");
$scope.setDefault = function (item, header) {
var setToChange = header === 'reportsRequiringDateRange' ? $rootScope.reportsRequiringDateRange : $rootScope.reportsNotRequiringDateRange;
var isPreviousMonth = $rootScope.default[header][item].getTime() === dateRange[2].getTime();
var isPreviousMonth = $rootScope.default[header][item]?.getTime() === dateRange[2]?.getTime();
setToChange.forEach(function (report) {
if (item == 'dateRangeType') {
$rootScope.default.reportsRequiringDateRange.startDate = $rootScope.default[header][item];
Expand Down

0 comments on commit 0f34f5b

Please sign in to comment.