From 788e871392e62e8070b12b754f5dc013ed63328a Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Sat, 25 Jul 2020 10:14:41 -0400 Subject: [PATCH] size() as catch-all --- services/gunDB/contact-api/jobs/onAcceptedRequests.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/gunDB/contact-api/jobs/onAcceptedRequests.js b/services/gunDB/contact-api/jobs/onAcceptedRequests.js index 55568679..51f82bff 100644 --- a/services/gunDB/contact-api/jobs/onAcceptedRequests.js +++ b/services/gunDB/contact-api/jobs/onAcceptedRequests.js @@ -6,6 +6,7 @@ const { Constants: { ErrorCode }, Schema } = require('shock-common') +const size = require('lodash/size') const Key = require('../key') const Utils = require('../utils') @@ -126,8 +127,8 @@ const onAcceptedRequests = (user, SEA) => { res(feed) }) }), - // retry on undefined, might be a false negative - v => typeof v === 'undefined' + // @ts-expect-error + v => size(v) === 0 ) const feedIDExistsOnRecipientsOutgoings =