mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-21 21:44:40 +03:00
1 parent
37164f3ced
commit
de2de50769
1 file changed
+4
-3
@@ -78,7 +78,7 @@ function ChildrenViewer({
|
|||||||
openTag: string
|
openTag: string
|
||||||
closeTag: string
|
closeTag: string
|
||||||
}) {
|
}) {
|
||||||
const { children, key, status, type } = diff;
|
const { children, key, status, type, oldValue } = diff;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<li>
|
<li>
|
||||||
@@ -90,9 +90,10 @@ function ChildrenViewer({
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{openTag}
|
{children.length === 0 && status === 'removed' && Value({ value: oldValue, status: 'removed' })}
|
||||||
|
{children.length > 0 && openTag}
|
||||||
{children.length > 0 && <ul>{children.map(diff => DiffViewer({ diff, showKeys: showChildrenKeys }))}</ul>}
|
{children.length > 0 && <ul>{children.map(diff => DiffViewer({ diff, showKeys: showChildrenKeys }))}</ul>}
|
||||||
{`${closeTag},`}
|
{children.length > 0 && `${closeTag},`}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user