diff --git a/package.json b/package.json index 9b6eb1d..4584ca3 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "fluent-ffmpeg": "^2.1.2", "jsqr": "^1.3.1", "mime": "^2.4.5", - "node-webpmux": "^3.0.0", + "node-webpmux": "^3.1.0", "puppeteer": "^10.1.0", "sharp": "^0.28.3" }, diff --git a/src/util/Injected.js b/src/util/Injected.js index 2fb2fcf..4087538 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -265,7 +265,11 @@ exports.LoadUtils = () => { const msg = message.serialize(); msg.isStatusV3 = message.isStatusV3; - msg.links = (message.getLinks()).map(link => ({ link: link.href, isSuspicious: link.suspiciousCharacters?.size ? true : false})); + msg.links = (message.getLinks()).map(link => ({ + link: link.href, + isSuspicious: Boolean(link.suspiciousCharacters && link.suspiciousCharacters.size) + })); + if (msg.buttons) { msg.buttons = msg.buttons.serialize(); }