diff --git a/CHANGELOG.md b/CHANGELOG.md index bca7c2b..3266ba6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +### [7.0.4](https://github.com/eea/volto-tabs-block/compare/7.0.3...7.0.4) - 4 December 2023 + +#### :bug: Bug Fixes + +- fix: check if schema.propierties.data exists - refs #261239 [dobri1408 - [`4bf628e`](https://github.com/eea/volto-tabs-block/commit/4bf628e4d0fdcb1c7919553bdcfedbea9a7e0a2e)] + ### [7.0.3](https://github.com/eea/volto-tabs-block/compare/7.0.2...7.0.3) - 29 November 2023 #### :bug: Bug Fixes diff --git a/package.json b/package.json index 96c50bb..4ca1581 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eeacms/volto-tabs-block", - "version": "7.0.3", + "version": "7.0.4", "description": "volto-tabs-block: Volto add-on", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team", diff --git a/src/components/templates/accordion/Edit.jsx b/src/components/templates/accordion/Edit.jsx index c85186c..3e85673 100644 --- a/src/components/templates/accordion/Edit.jsx +++ b/src/components/templates/accordion/Edit.jsx @@ -117,7 +117,7 @@ const Edit = (props) => { ...(newFormData.blocks_layout.items.length > 0 ? newFormData : emptyTab({ - schema: schema.properties.data.schema, + schema: schema?.properties?.data?.schema || {}, intl, })), }, diff --git a/src/components/templates/default/Edit.jsx b/src/components/templates/default/Edit.jsx index 71ee35c..9778db6 100644 --- a/src/components/templates/default/Edit.jsx +++ b/src/components/templates/default/Edit.jsx @@ -59,7 +59,7 @@ export const MenuItem = (props) => { ...tabsData.blocks, [tabId]: { ...emptyTab({ - schema: schema.properties.data.schema, + schema: schema?.properties?.data?.schema || {}, intl, }), }, @@ -267,7 +267,7 @@ const Edit = (props) => { ...(newFormData.blocks_layout.items.length > 0 ? newFormData : emptyTab({ - schema: schema.properties.data.schema, + schema: schema?.properties?.data?.schema || {}, intl, })), },