From e38dff54484deccfe5971cf1468de3a5fc48208a Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Sun, 19 Apr 2020 23:03:53 -0700 Subject: [PATCH] make getPathString functional --- js/modules/loki_rpc.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/js/modules/loki_rpc.js b/js/modules/loki_rpc.js index 001ae5c36..0734428bd 100644 --- a/js/modules/loki_rpc.js +++ b/js/modules/loki_rpc.js @@ -520,13 +520,8 @@ const lokiFetch = async (url, options = {}, targetNode = null) => { fetchOptions.body ); - const getPathString = pathObjArr => { - const pathArr = []; - pathObjArr.forEach(node => { - pathArr.push(`${node.ip}:${node.port}`); - }); - return pathArr.join(', '); - }; + const getPathString = pathObjArr => + pathObjArr.map(node => `${node.ip}:${node.port}`).join(', '); if (result === BAD_PATH) { log.error(