Skip to content

Commit

Permalink
fixed formateToStylish function
Browse files Browse the repository at this point in the history
  • Loading branch information
zebpaa committed Jun 30, 2024
1 parent 649cd4a commit ab37906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/formatters/stylish.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit ab37906

Please sign in to comment.