Filter out empty strings after splitting top-level JSON

Summary: https://fb.workplace.com/groups/flippersupport/permalink/1169477680199555/

Reviewed By: jknoxville

Differential Revision: D29637437

fbshipit-source-id: cd8c55141f2d95afeea0f8680dd3a0d29943c200
This commit is contained in:
Alex Min
2021-07-09 10:02:53 -07:00
committed by Facebook GitHub Bot
parent e346c79ffd
commit 9498a529d5

View File

@@ -610,6 +610,7 @@ class GraphQLFormatter {
const parsedResponses = body
.replace(/}{/g, '}\r\n{')
.split('\n')
.filter((json) => json.length > 0)
.map((json) => JSON.parse(json));
return (
<div>