From 12407f00af52c1f5bcdd8567728ba63d12285f91 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 21 Nov 2024 14:27:24 -0300 Subject: [PATCH] fix: Indent JSON output for exported flow data (#4750) Indent JSON output for exported flow data in reactflowUtils.ts --- src/frontend/src/utils/reactflowUtils.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/utils/reactflowUtils.ts b/src/frontend/src/utils/reactflowUtils.ts index 41ab8cb85..fc902c36b 100644 --- a/src/frontend/src/utils/reactflowUtils.ts +++ b/src/frontend/src/utils/reactflowUtils.ts @@ -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