mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Added guard for page.items existing in Mailgun response
no issue - it's possible to get Mailgun responses where the `items` array doesn't exist so we need to guard against that so we don't error
This commit is contained in:
parent
f351357159
commit
84ae8585c6
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ class EmailAnalyticsMailgunProvider {
|
|||
}
|
||||
|
||||
page = await mailgun.get(page.paging.next.replace('https://api.mailgun.net/v3', ''));
|
||||
events = page.items.map(this.normalizeEvent);
|
||||
events = page && page.items && page.items.map(this.normalizeEvent) || [];
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Add table
Reference in a new issue