design-comuni-plone-theme 8.4.0 → 8.4.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
 
2
2
 
3
+ ## [8.4.1](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.4.0...v8.4.1) (2023-08-24)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * external urls in images ([39429d6](https://github.com/RedTurtle/design-comuni-plone-theme/commit/39429d6b7b361f78c05e41f35d71e4b3184092dc))
9
+
10
+
11
+ ### Documentation
12
+
13
+ * updated publiccode ([21170fd](https://github.com/RedTurtle/design-comuni-plone-theme/commit/21170fdf50ff47f91d37c3dd0b5f11f97a94e6db))
14
+
3
15
  ## [8.4.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.3.2...v8.4.0) (2023-08-24)
4
16
 
5
17
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "design-comuni-plone-theme",
3
3
  "description": "Volto Theme for Italia design guidelines",
4
4
  "license": "GPL-v3",
5
- "version": "8.4.0",
5
+ "version": "8.4.1",
6
6
  "main": "src/index.js",
7
7
  "keywords": [
8
8
  "volto-addon",
package/publiccode.yml CHANGED
@@ -229,7 +229,7 @@ platforms:
229
229
  - web
230
230
  releaseDate: '2023-08-24'
231
231
  softwareType: standalone/web
232
- softwareVersion: 8.4.0
232
+ softwareVersion: 8.4.1
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -3,6 +3,7 @@ import { flattenToAppURL, isInternalURL } from '@plone/volto/helpers';
3
3
  import config from '@plone/volto/registry';
4
4
 
5
5
  const getImageIsFromBrain = (imageDownloadUrl) => {
6
+ if (typeof imageDownloadUrl !== 'string') return false;
6
7
  // Old check against itemUrl truthyness isn't valid anymore.
7
8
  // All brains have item[@id], need to check if image.download
8
9
  // starts with @@images
@@ -47,7 +48,7 @@ export const getImageAttributes = (
47
48
  // while regular content objects have scales with full urls (i.e. https://.../@@images/...)
48
49
  let itemPath = flattenToAppURL(itemUrl ?? '');
49
50
  if (itemPath.slice(-1) !== '/') itemPath = `${itemPath}/`;
50
- const isFromBrain = getImageIsFromBrain(image?.download);
51
+ const isFromBrain = getImageIsFromBrain(image?.download ?? image);
51
52
 
52
53
  const imageScales = config.settings.imageScales;
53
54