Skip to content

Commit

Permalink
Merge pull request #40734 from Expensify/marcaaron-normalizeISOdates
Browse files Browse the repository at this point in the history
Format ISO string correctly when missing reportAction to find `mostRecentReportActionLastModified`
  • Loading branch information
yuwenmemon authored Apr 23, 2024
2 parents 058044b + e1a2bd5 commit 6e699cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import type {Message, ReportActionBase, ReportActions} from '@src/types/onyx/Rep
import type ReportAction from '@src/types/onyx/ReportAction';
import type {EmptyObject} from '@src/types/utils/EmptyObject';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
import DateUtils from './DateUtils';
import * as Environment from './Environment/Environment';
import isReportMessageAttachment from './isReportMessageAttachment';
import * as Localize from './Localize';
Expand Down Expand Up @@ -726,7 +727,7 @@ function getReportAction(reportID: string, reportActionID: string): OnyxEntry<Re

function getMostRecentReportActionLastModified(): string {
// Start with the oldest date possible
let mostRecentReportActionLastModified = new Date(0).toISOString();
let mostRecentReportActionLastModified = DateUtils.getDBTime(0);

// Flatten all the actions
// Loop over them all to find the one that is the most recent
Expand Down

0 comments on commit 6e699cf

Please sign in to comment.