From 8daf0d26bfd759fdb98f6d46ec753081bc673477 Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Tue, 8 Dec 2020 17:44:45 +0100
Subject: [PATCH] bugfix: not fetching ieeg data

---
 deploy/datasets/query.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/deploy/datasets/query.js b/deploy/datasets/query.js
index 778891655..d086d8c6f 100644
--- a/deploy/datasets/query.js
+++ b/deploy/datasets/query.js
@@ -128,14 +128,16 @@ const getDs = ({ user }) => (user
        */
       const existingEntryIdx = acc.findIndex(v => v['fullId'] === curr['fullId'])
       if (existingEntryIdx >= 0) {
-        const returnArr = [...acc].splice(existingEntryIdx, 1, {
+        const itemToReturn = {
           ...acc[existingEntryIdx],
           ...curr,
           parcellationRegion: [
             ...(curr['parcellationRegion'] || []),
             ...(acc[existingEntryIdx]['parcellationRegion'] || [])
           ]
-        })
+        }
+        const returnArr = [...acc]
+        returnArr.splice(existingEntryIdx, 1, itemToReturn)
         return returnArr
       }
       else return acc.concat(curr)
-- 
GitLab