瀏覽代碼

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

tags/1.2.0
yusheng chen 6 月之前
父節點
當前提交
bf69b97639
沒有連結到貢獻者的電子郵件帳戶。
共有 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…
取消
儲存