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:
parent
8fd94f0298
commit
31ee0c7609
2 changed files with 3 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ export default function ExportModal() {
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const [checked, setChecked] = useState(true);
|
const [checked, setChecked] = useState(false);
|
||||||
const [name, setName] = useState(flows.find((f) => f.id === tabId).name);
|
const [name, setName] = useState(flows.find((f) => f.id === tabId).name);
|
||||||
const [description, setDescription] = useState(
|
const [description, setDescription] = useState(
|
||||||
flows.find((f) => f.id === tabId).description
|
flows.find((f) => f.id === tabId).description
|
||||||
|
|
|
||||||
|
|
@ -491,9 +491,10 @@ export function isValidConnection(
|
||||||
|
|
||||||
export function removeApiKeys(flow: FlowType): FlowType {
|
export function removeApiKeys(flow: FlowType): FlowType {
|
||||||
let cleanFLow = _.cloneDeep(flow);
|
let cleanFLow = _.cloneDeep(flow);
|
||||||
|
console.log(cleanFLow);
|
||||||
cleanFLow.data.nodes.forEach((node) => {
|
cleanFLow.data.nodes.forEach((node) => {
|
||||||
for (const key in node.data.node.template) {
|
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 = "";
|
node.data.node.template[key].value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue