fix: Indent JSON output for exported flow data (#4750)

Indent JSON output for exported flow data in reactflowUtils.ts
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-11-21 14:27:24 -03:00 committed by GitHub
commit 12407f00af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1562,11 +1562,15 @@ export function downloadFlow(
removeFileNameFromComponents(clonedFlow);
// create a data URI with the current flow data
const jsonString = `data:text/json;chatset=utf-8,${encodeURIComponent(
JSON.stringify({
...clonedFlow,
name: flowName,
description: flowDescription,
}),
JSON.stringify(
{
...clonedFlow,
name: flowName,
description: flowDescription,
},
null,
2,
),
)}`;
// create a link element and set its properties