From ab379068431b6926eb036ed110a679df47c7dd1c Mon Sep 17 00:00:00 2001 From: zebpaa Date: Sun, 30 Jun 2024 20:41:17 +0400 Subject: [PATCH] fixed formateToStylish function --- src/formatters/stylish.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/formatters/stylish.js b/src/formatters/stylish.js index d95dc44..8cf36e7 100644 --- a/src/formatters/stylish.js +++ b/src/formatters/stylish.js @@ -22,7 +22,7 @@ const formateToStylish = (tree) => { const result = {}; // eslint-disable-next-line array-callback-return tree.map((obj) => { - if (obj.type === 'nested') formateToStylish(obj.children); + if (obj.type === 'nested') result[`${obj.key}`] = formateToStylish(obj.children); else if (obj.type === 'added') result[`+ ${obj.key}`] = obj.value; else if (obj.type === 'deleted') result[`- ${obj.key}`] = obj.value; else if (obj.type === 'changed') {