From e81a35ccb8381c3132872f2d461134e1f4481080 Mon Sep 17 00:00:00 2001 From: marcricharme Date: Thu, 19 Mar 2020 10:38:26 +0100 Subject: [PATCH] fix(core): custom widget validate bug in EditorControlPane (#3435) --- .../components/Editor/EditorControlPane/EditorControlPane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/netlify-cms-core/src/components/Editor/EditorControlPane/EditorControlPane.js b/packages/netlify-cms-core/src/components/Editor/EditorControlPane/EditorControlPane.js index 367ab761..4a151eae 100644 --- a/packages/netlify-cms-core/src/components/Editor/EditorControlPane/EditorControlPane.js +++ b/packages/netlify-cms-core/src/components/Editor/EditorControlPane/EditorControlPane.js @@ -19,7 +19,7 @@ export default class ControlPane extends React.Component { const name = field.get('name'); this.componentValidate[name] = - wrappedControl.innerWrappedControl.validate || wrappedControl.validate; + wrappedControl.innerWrappedControl?.validate || wrappedControl.validate; } validate = () => {