From 40cec51956e5e22d7cfc6a6a734b98fc43ba8d89 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sun, 1 Aug 2021 23:56:27 -0400 Subject: [PATCH] fix: node v12 support --- package.json | 2 +- src/util/Injected.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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(); }