Skip to content

Commit

Permalink
fix(ui): mutate form states after export
Browse files Browse the repository at this point in the history
  • Loading branch information
shhdgit committed Apr 15, 2024
1 parent e95e5c2 commit fb24fde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/modules/app_builder/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { GithubLogo } from '../../components/Layout/GithubLogo'
import { PublishModal } from '../shared/PublishModal'
import { BuilderCanvas } from './Canvas'
import { SchemaProvider } from './useSchema'
import { Config, ConfigAndMetadataUI, MetadataUI } from './linguflow.type'
import { Config, ConfigAndMetadataUI, MetadataUI, Node } from './linguflow.type'
import { ContainerElemProvider } from './Canvas/useContainerElem'
import { TOOLBAR_HEIGHT, TOOLBAR_PANE_HEIGHT, Toolbar } from './Toolbar'
import { getCurrentDateTimeName, useCreateVersion, useUpdateVersion } from './useMutateVersion'
Expand Down Expand Up @@ -305,7 +305,7 @@ const BuilderMenu: React.FC<{
}

const exportYAML = () => {
const nodes = Object.values(getValues())
const nodes: Node[] = JSON.parse(JSON.stringify(Object.values(getValues())))
nodes.forEach((v: { [k: string]: any }) => sanitize(v))

const config: ConfigAndMetadataUI = {
Expand Down

0 comments on commit fb24fde

Please sign in to comment.