Skip to content

Commit a859ca0

Browse files
committed
modify src/formatters/plain.js
1 parent acc335f commit a859ca0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/formatters/plain.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ const getPath = (keyPath) => {
1717

1818
const plain = (tree) => {
1919
const iter = (node, path = '') => {
20+
if (node.length === 0) {
21+
return 'Both files are empty';
22+
}
23+
2024
const properties = node
2125
.filter(({ type }) => type !== 'unchanged')
2226
.map(({

0 commit comments

Comments
 (0)