Bullet-proofing export scenarios: null attachments, no msgreceiver

FREEBIE
pull/749/head
Scott Nonnenberg 8 years ago
parent c0cd733139
commit d31d1712b1
No known key found for this signature in database
GPG Key ID: A4931C09644C654B

@ -334,7 +334,7 @@
Whisper.events.trigger('reconnectTimer');
} else {
console.log('offline');
messageReceiver.close();
if (messageReceiver) { messageReceiver.close(); }
window.addEventListener('online', init);
}
return;

@ -369,7 +369,7 @@
var jsonString = JSON.stringify(stringify(message));
stream.write(jsonString);
if (attachments.length) {
if (attachments && attachments.length) {
var process = function() {
return writeAttachments(dir, name, messageId, attachments);
};

Loading…
Cancel
Save