From 265ecd66e198ee92c7616ad57ea3f90a8f813bd4 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Sun, 17 Nov 2019 23:06:31 +0900 Subject: [PATCH] Fix parsing non atom tuples --- src/store/modules/normalizers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/modules/normalizers.js b/src/store/modules/normalizers.js index ce08b328..3499157e 100644 --- a/src/store/modules/normalizers.js +++ b/src/store/modules/normalizers.js @@ -110,11 +110,11 @@ export const parseTuples = (tuples, key) => { accum[item.tuple[0]] = {} } else if (Array.isArray(item.tuple[1]) && (typeof item.tuple[1][0] === 'object' && !Array.isArray(item.tuple[1][0])) && item.tuple[1][0]['tuple']) { + accum[item.tuple[0]] = parseTuples(item.tuple[1]) + } else if (Array.isArray(item.tuple[1])) { nonAtomsTuples.includes(item.tuple[0]) ? accum[item.tuple[0]] = parseNonAtomTuples(item.tuple[1]) - : accum[item.tuple[0]] = parseTuples(item.tuple[1]) - } else if (Array.isArray(item.tuple[1])) { - accum[item.tuple[0]] = item.tuple[1] + : accum[item.tuple[0]] = item.tuple[1] } else if (item.tuple[0] === ':ip') { accum[item.tuple[0]] = item.tuple[1].tuple.join('.') } else if (item.tuple[1] && typeof item.tuple[1] === 'object' && 'tuple' in item.tuple[1]) {