From e05991b171d4122a6a2397689bcacb0254b1f975 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Thu, 13 Feb 2020 14:21:07 -0400 Subject: [PATCH] tweak --- services/gunDB/contact-api/streams/pubToFeed.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/services/gunDB/contact-api/streams/pubToFeed.js b/services/gunDB/contact-api/streams/pubToFeed.js index 9dd4733c..f94d8caf 100644 --- a/services/gunDB/contact-api/streams/pubToFeed.js +++ b/services/gunDB/contact-api/streams/pubToFeed.js @@ -156,9 +156,8 @@ const react = () => { const gun = require('../../Mediator').getGun() - const newPubToFeed = { - ...getPubToFeed() - } + /** @type {Feeds} */ + const newPubToFeed = {} for (const [pub, inc] of Object.entries(pubToIncoming)) { /** @@ -195,7 +194,10 @@ const react = () => { } if (Object.keys(newPubToFeed).length > 0) { - setPubToFeed(newPubToFeed) + setPubToFeed({ + ...getPubToFeed(), + ...newPubToFeed + }) } }