Fix crashing page due to newsletter not found error

MAILPOET-4688
This commit is contained in:
Oluwaseun Olorunsola
2022-10-27 20:53:28 +01:00
committed by Aschepikov
parent 1d31202607
commit c4366e009b
2 changed files with 6 additions and 0 deletions

View File

@@ -99,6 +99,10 @@ function CampaignStatsPageComponent({ match, history, location }: Props) {
);
}
if (!newsletter) {
return <h3> {MailPoet.I18n.t('emailDoesNotExist')} </h3>;
}
return (
<>
<HideScreenOptions />

View File

@@ -194,6 +194,8 @@
'checkBackInHours': __('Nice job! Check back in %1$d hour(s) for more stats.'),
'improveThisLinkText': __('What can I do to improve this?'),
'emailDoesNotExist': __('This email does not exist.'),
'templateFileMalformedError': __('This template file appears to be damaged. Please try another one.'),
'importTemplateTitle': __('Import a template'),
'selectJsonFileToUpload': __('Select a .json file to upload'),