From 29f412d814592c6443938186b84f64a86fa4390b Mon Sep 17 00:00:00 2001 From: Rob Gietema Date: Mon, 23 Dec 2024 10:04:41 -0700 Subject: [PATCH] Fix getVocabulary import. --- .../volto/src/components/manage/Widgets/SchemaWidget.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/volto/src/components/manage/Widgets/SchemaWidget.jsx b/packages/volto/src/components/manage/Widgets/SchemaWidget.jsx index 4ca24afada..0aeb01b4f0 100644 --- a/packages/volto/src/components/manage/Widgets/SchemaWidget.jsx +++ b/packages/volto/src/components/manage/Widgets/SchemaWidget.jsx @@ -22,7 +22,7 @@ import { defineMessages, injectIntl } from 'react-intl'; import config from '@plone/volto/registry'; import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable'; import { slugify } from '@plone/volto/helpers/Utils/Utils'; -import { getVocabulary } from '@plone/volto/actions'; +import { getVocabulary } from '@plone/volto/actions/vocabularies/vocabularies'; import SchemaWidgetFieldset from '@plone/volto/components/manage/Widgets/SchemaWidgetFieldset'; import { Field, ModalForm } from '@plone/volto/components/manage/Form'; @@ -1498,7 +1498,10 @@ class SchemaWidget extends Component { if (!this.props.value) { return ''; } - const choices = [...this.props.fields, ...this.props.additionalFactory]; + const choices = [ + ...this.props.fields, + ...(this.props.additionalFactory || []), + ]; let editFieldType = ''; if (this.state.editField) { let factory =