소스 검색

refactor & perf: declare const object outside component `ConstantField` (#17495)

tags/1.2.0
yusheng chen 6 달 전
부모
커밋
bf69b97639
No account linked to committer's email address
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3
    1
      web/app/components/workflow/nodes/_base/components/variable/constant-field.tsx

+ 3
- 1
web/app/components/workflow/nodes/_base/components/variable/constant-field.tsx 파일 보기

@@ -15,8 +15,10 @@ type Props = {
onChange: (value: string | number, varKindType: VarKindType, varInfo?: Var) => void
}

const DEFAULT_SCHEMA = {} as CredentialFormSchema

const ConstantField: FC<Props> = ({
schema = {} as CredentialFormSchema,
schema = DEFAULT_SCHEMA,
readonly,
value,
onChange,

Loading…
취소
저장