fix(StorePage): fix typo in function name from cloneFLowWithParent to cloneFlowWithParent
fix(storeUtils): add missing type annotations to function parameters in cloneFlowWithParent function
This commit is contained in:
parent
b33878088e
commit
4d04400309
2 changed files with 6 additions and 3 deletions
|
|
@ -87,7 +87,7 @@ export default function StorePage(): JSX.Element {
|
|||
getComponent(flowId).then(
|
||||
(res) => {
|
||||
console.log(res);
|
||||
const newFLow = cloneFLowWithParent(res.data, is_component);
|
||||
const newFLow = cloneFLowWithParent(res.data, res.id, is_component);
|
||||
console.log(newFLow);
|
||||
saveFlowStore(newFLow).then(
|
||||
(res) => {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
import { cloneDeep } from "lodash";
|
||||
import { FlowType } from "../types/flow";
|
||||
|
||||
export default function cloneFLowWithParent(flow: FlowType, is_component) {
|
||||
const parent = flow.id;
|
||||
export default function cloneFLowWithParent(
|
||||
flow: FlowType,
|
||||
parent: string,
|
||||
is_component: boolean
|
||||
) {
|
||||
let childFLow = cloneDeep(flow);
|
||||
childFLow.parent = parent;
|
||||
childFLow.id = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue