Skip to content

Commit 986056e

Browse files
authored
Fixed Analytics > Newsletters chart loading (#24566)
ref https://linear.app/ghost/issue/ENG-2493/ ref 31932c5 - formatDisplayDate was being called with a Date object instead of date string We updated date formatting to ingest localized dates as localized dates and UTC dates as UTC dates, however we introduced a string function that broke the call when used with a Date object instead of date string. The previous implementation did not have this trouble. I would've expected the Typescript build to fail here - I will have to look in to that.
1 parent 52daa74 commit 986056e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/stats/src/views/Stats/Newsletters/Newsletters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const NewsletterTableRows: React.FC<{
8585
</div>
8686
</TableCell>
8787
<TableCell className="whitespace-nowrap text-sm">
88-
{formatDisplayDate(new Date(post.send_date))}
88+
{formatDisplayDate(post.send_date)}
8989
</TableCell>
9090
<TableCell className='text-right font-mono text-sm'>
9191
{formatNumber(post.sent_to)}

0 commit comments

Comments
 (0)