From 9ece4e1fd8c454d017fb81f1bad88e8e11e17482 Mon Sep 17 00:00:00 2001 From: Beaudan Date: Fri, 25 Jan 2019 14:35:09 +1100 Subject: [PATCH] Review comments --- js/modules/data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/modules/data.js b/js/modules/data.js index c5489ae6c..e8afe5b14 100644 --- a/js/modules/data.js +++ b/js/modules/data.js @@ -662,8 +662,8 @@ async function removeAllSessions(id) { function setifyProperty(data, propertyName) { if (!data) return data; - const returnData = data; - if (returnData[propertyName] && Array.isArray(returnData[propertyName])) { + const returnData = { ...data }; + if (Array.isArray(returnData[propertyName])) { returnData[propertyName] = new Set(returnData[propertyName]); } return returnData;