@plone/volto 17.22.0 → 17.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/CHANGELOG.md CHANGED
@@ -17,6 +17,19 @@ myst:
17
17
 
18
18
  <!-- towncrier release notes start -->
19
19
 
20
+ ## 17.22.2 (2025-09-29)
21
+
22
+ ### Bugfix
23
+
24
+ - Added guard in API REDUX middleware. @sneridagh [#7412](https://github.com/plone/volto/issues/7412)
25
+
26
+ ## 17.22.1 (2025-08-25)
27
+
28
+ ### Bugfix
29
+
30
+ - fix(fetchContent): correctly handle undefined blocksType in async fetchContent @nileshgulia1 [#7112](https://github.com/plone/volto/issues/7112)
31
+ - Fix corner case in devproxy when pathname is null. @sneridagh [#7276](https://github.com/plone/volto/issues/7276)
32
+
20
33
  ## 17.22.0 (2025-05-20)
21
34
 
22
35
  ### Feature
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "17.22.0",
12
+ "version": "17.22.2",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plone/volto-slate",
3
- "version": "17.22.0",
3
+ "version": "17.22.2",
4
4
  "description": "Slate.js integration with Volto",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -232,7 +232,9 @@ export const fetchContent = async ({ store, location }) => {
232
232
 
233
233
  const visitor = ([id, data]) => {
234
234
  const blockType = data['@type'];
235
- const { getAsyncData } = blocksConfig[blockType];
235
+ const block = blocksConfig[blockType];
236
+ if (!block) return;
237
+ const { getAsyncData } = block;
236
238
  if (getAsyncData) {
237
239
  const p = getAsyncData({
238
240
  store,
@@ -10,8 +10,13 @@ import querystring from 'querystring';
10
10
  import { parse as parseUrl } from 'url';
11
11
 
12
12
  const filter = function (pathname, req) {
13
- // This is the proxy to the API in case the accept header is 'application/json'
14
- return config.settings.devProxyToApiPath && pathname.startsWith('/++api++');
13
+ // Check if pathname is defined, there are some corner cases that pathname is null
14
+ if (pathname) {
15
+ // This is the proxy to the API in case the accept header is 'application/json'
16
+ return config.settings.devProxyToApiPath && pathname.startsWith('/++api++');
17
+ } else {
18
+ return false;
19
+ }
15
20
  };
16
21
 
17
22
  let _env = null;
@@ -346,7 +346,7 @@ const apiMiddlewareFactory =
346
346
  ...rest,
347
347
  error,
348
348
  statusCode: error.response,
349
- message: error.response.body.message,
349
+ message: error.response?.body?.message,
350
350
  connectionRefused: false,
351
351
  type: SET_APIERROR,
352
352
  });