From 5173a95d24b58e08321597956933caf8277dab47 Mon Sep 17 00:00:00 2001 From: boufni95 <33513308+boufni95@users.noreply.github.com> Date: Thu, 30 Jan 2020 21:17:51 +0100 Subject: [PATCH] parse to json object in case of string body --- services/gunDB/Mediator/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/gunDB/Mediator/index.js b/services/gunDB/Mediator/index.js index 6ecd4476..2aa3e827 100644 --- a/services/gunDB/Mediator/index.js +++ b/services/gunDB/Mediator/index.js @@ -350,7 +350,9 @@ class Mediator { console.error('Unknown Device', error) return false } - + if(typeof data === 'string'){ + data = JSON.parse(data) + } console.log('Event:', eventName) console.log('Data:', data) console.log('Decrypt params:', {