diff --git a/js/background.js b/js/background.js index 46c52f36a..64fabbd0b 100644 --- a/js/background.js +++ b/js/background.js @@ -256,8 +256,7 @@ storage.put('read-receipt-setting', value), getLinkPreviewSetting: () => storage.get('linkPreviews', false), - setLinkPreviewSetting: value => - storage.put('linkPreviews', value), + setLinkPreviewSetting: value => storage.put('linkPreviews', value), getNotificationSetting: () => storage.get('notification-setting', 'message'), diff --git a/js/models/messages.js b/js/models/messages.js index 34b652021..2c6cf7d45 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -140,13 +140,9 @@ try { const result = await Signal.LinkPreviews.helper.getPreview(firstLink); - if (!result) { - this.updatingPreview = false; - return; - } - if (!result.image && !result.title) { - // A link preview isn't worth showing unless we have either a title or an image + // A link preview isn't worth showing unless we have either a title or an image + if (!result || !(result.image || result.title)) { this.updatingPreview = false; return; }