Selaa lähdekoodia

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

tags/1.2.0
yusheng chen 6 kuukautta sitten
vanhempi
commit
bf69b97639
No account linked to committer's email address

+ 3
- 1
web/app/components/workflow/nodes/_base/components/variable/constant-field.tsx Näytä tiedosto

@@ -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…
Peruuta
Tallenna