From 31ee0c7609f8facec2f7d1e65b8636ed3456a16e Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Fri, 16 Jun 2023 16:05:19 -0300 Subject: [PATCH] fix(exportModal): set initial state of checked to false instead of true refactor(utils.ts): remove console.log statement and simplify if statement in removeApiKeys function --- src/frontend/src/modals/exportModal/index.tsx | 2 +- src/frontend/src/utils.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/modals/exportModal/index.tsx b/src/frontend/src/modals/exportModal/index.tsx index 199c74256..30567b4f1 100644 --- a/src/frontend/src/modals/exportModal/index.tsx +++ b/src/frontend/src/modals/exportModal/index.tsx @@ -34,7 +34,7 @@ export default function ExportModal() { }, 300); } } - const [checked, setChecked] = useState(true); + const [checked, setChecked] = useState(false); const [name, setName] = useState(flows.find((f) => f.id === tabId).name); const [description, setDescription] = useState( flows.find((f) => f.id === tabId).description diff --git a/src/frontend/src/utils.ts b/src/frontend/src/utils.ts index 569cf76e4..c09c64b2b 100644 --- a/src/frontend/src/utils.ts +++ b/src/frontend/src/utils.ts @@ -491,9 +491,10 @@ export function isValidConnection( export function removeApiKeys(flow: FlowType): FlowType { let cleanFLow = _.cloneDeep(flow); + console.log(cleanFLow); cleanFLow.data.nodes.forEach((node) => { for (const key in node.data.node.template) { - if (node.data.node.template[key].password!==undefined) { + if (node.data.node.template[key].password) { node.data.node.template[key].value = ""; } }