Skip to content

Commit 869bfe0

Browse files
authored
fix(json): return empty output as empty list (#4)
1 parent e00afd6 commit 869bfe0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

post.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ function json(json, filter) {
127127
.reduce(function(acc, line) {
128128
return acc.concat(JSON.parse(line))
129129
}, [])
130-
} else {
130+
} else if (result !== '') {
131131
return JSON.parse(result)
132+
} else {
133+
return []
132134
}
133135
}
134136

0 commit comments

Comments
 (0)