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
This commit is contained in:
anovazzi1 2023-06-16 16:05:19 -03:00
commit 31ee0c7609
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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 = "";
}
}