make safe to call when no attachments present
This commit is contained in:
parent
fba5877b3b
commit
a23075a326
1 changed files with 2 additions and 2 deletions
|
@ -85,11 +85,11 @@ export class PendingEvent {
|
||||||
get error() { return this._error; }
|
get error() { return this._error; }
|
||||||
|
|
||||||
get attachmentsTotalBytes() {
|
get attachmentsTotalBytes() {
|
||||||
return Object.values(this._attachments).reduce((t, a) => t + a.size, 0);
|
return this._attachments && Object.values(this._attachments).reduce((t, a) => t + a.size, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
get attachmentsSentBytes() {
|
get attachmentsSentBytes() {
|
||||||
return Object.values(this._attachments).reduce((t, a) => t + a.sentBytes, 0);
|
return this._attachments && Object.values(this._attachments).reduce((t, a) => t + a.sentBytes, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
async uploadAttachments(hsApi) {
|
async uploadAttachments(hsApi) {
|
||||||
|
|
Reference in a new issue