Skip to content

Commit

Permalink
Merge pull request #180 from eea/develop
Browse files Browse the repository at this point in the history
Release fix for #261239
  • Loading branch information
avoinea authored Dec 4, 2023
2 parents 7905c2b + b2e37ec commit dc41ab1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

### [1.24.2](https://github.com/eea/volto-eea-website-theme/compare/1.24.1...1.24.2) - 4 December 2023

#### :bug: Bug Fixes

- fix: check if schema has properties.data - refs #261239 [dobri1408 - [`b2a5faf`](https://github.com/eea/volto-eea-website-theme/commit/b2a5fafa8e41a4ea2d5124f8f6cd3e6bbd276a21)]

### [1.24.1](https://github.com/eea/volto-eea-website-theme/compare/1.24.0...1.24.1) - 27 November 2023

#### :nail_care: Enhancements
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-eea-website-theme",
"version": "1.24.1",
"version": "1.24.2",
"description": "@eeacms/volto-eea-website-theme: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ function tabVariationCustomization(tabs_block_variations, config) {
const schema = (oldSchemaEnhancer ? oldSchemaEnhancer(props) : props)
.schema;
const oldSchemaExtender = schema.properties?.data?.schemaExtender;

//check before if schema.properties.data exists
if (!schema?.properties?.data) {
schema.properties = {
...schema.properties,
data: {},
};
}

schema.properties.data.schemaExtender = (schema, child) => {
const innerSchema = oldSchemaExtender
? oldSchemaExtender(schema, child)
Expand Down

0 comments on commit dc41ab1

Please sign in to comment.