Skip to content

Commit

Permalink
Fix getVocabulary import.
Browse files Browse the repository at this point in the history
  • Loading branch information
robgietema committed Dec 23, 2024
1 parent dc2c6a4 commit 29f412d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/volto/src/components/manage/Widgets/SchemaWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 29f412d

Please sign in to comment.