Skip to content

Commit

Permalink
Merge pull request #63 from eea/develop
Browse files Browse the repository at this point in the history
fix: remove parseInt
  • Loading branch information
avoinea authored Jun 7, 2024
2 parents 1b1d820 + 32ce26f commit 0e5ff1e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ 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).

### [10.0.2](https://github.com/eea/volto-embed/compare/10.0.1...10.0.2) - 7 June 2024

#### :bug: Bug Fixes

- fix: re-add parseInt with a check for NaN [nileshgulia1 - [`f7dd30c`](https://github.com/eea/volto-embed/commit/f7dd30c47aa2cc31726e49b8eb4cb40aae624941)]
- fix: remove parseInt [nileshgulia1 - [`0b981b4`](https://github.com/eea/volto-embed/commit/0b981b4035b247ce8bd086ab90fc5dd4a23865c8)]

### [10.0.1](https://github.com/eea/volto-embed/compare/10.0.0...10.0.1) - 4 June 2024

#### :bug: Bug Fixes
Expand All @@ -15,14 +22,37 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Merge pull request #62 from eea/develop [Nilesh - [`1b1d820`](https://github.com/eea/volto-embed/commit/1b1d820b206b35b6522866d7427563e69f10cc12)]
- test: add cypress 13 to devdependencies [ana-oprea - [`b341aaf`](https://github.com/eea/volto-embed/commit/b341aaf1d0a1c0e2b15c77b725481ca50943c190)]
## [10.0.0](https://github.com/eea/volto-embed/compare/9.1.1...10.0.0) - 23 April 2024
## [10.0.0](https://github.com/eea/volto-embed/compare/9.1.4...10.0.0) - 23 April 2024

#### :rocket: New Features

- feat: Release 10.0.0 - Volto 17 support [alin - [`bea6fba`](https://github.com/eea/volto-embed/commit/bea6fba260bf0551ac17f7c2e30ddd5717756733)]
- feat: Volto 17 support - refs #264527 [EEA Jenkins - [`fd4b412`](https://github.com/eea/volto-embed/commit/fd4b412405a32abfb680383c2769013974184371)]

### [9.1.4](https://github.com/eea/volto-embed/compare/9.1.2...9.1.4) - 4 June 2024

#### :bug: Bug Fixes

- fix: update snapshots [nileshgulia1 - [`bf3578c`](https://github.com/eea/volto-embed/commit/bf3578c38c48c0053aca06bd13958f49bcbab49c)]
- fix: remove parseInt [nileshgulia1 - [`ba532ee`](https://github.com/eea/volto-embed/commit/ba532eea34905ade2a54d623dc2a11646ad52ce6)]

#### :hammer_and_wrench: Others

- Release 9.1.4 [nileshgulia1 - [`f4c7053`](https://github.com/eea/volto-embed/commit/f4c7053e5baae054ab36792b60f57382ee810796)]
- Release 9.1.3 [nileshgulia1 - [`ee6135e`](https://github.com/eea/volto-embed/commit/ee6135eaaedf3f881476a650b100ace1727b9e3f)]
- pin cypress to"13.1.0" [nileshgulia1 - [`2ba5b25`](https://github.com/eea/volto-embed/commit/2ba5b25aff2f4e1388e5482f4f71de7b3dcd2e76)]
- update snapshot [nileshgulia1 - [`14191dc`](https://github.com/eea/volto-embed/commit/14191dc5f0a9b841cb6f0cbf51ae6426a20bfa7a)]
### [9.1.2](https://github.com/eea/volto-embed/compare/9.1.1...9.1.2) - 4 June 2024

#### :bug: Bug Fixes

- fix: unnecessary rerenders due to props.height [nileshgulia1 - [`36c012d`](https://github.com/eea/volto-embed/commit/36c012d8ea1b251a1d5a012f7b27cfa9d9436464)]

#### :hammer_and_wrench: Others

- Release 9.1.2 [nileshgulia1 - [`3da0041`](https://github.com/eea/volto-embed/commit/3da0041f0d8ebcaa614f1cc01dd0e6cc011a42a9)]
### [9.1.1](https://github.com/eea/volto-embed/compare/9.1.0...9.1.1) - 6 February 2024

#### :hammer_and_wrench: Others
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-embed",
"version": "10.0.1",
"version": "10.0.2",
"description": "Embed external content",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
9 changes: 6 additions & 3 deletions src/PrivacyProtection/PrivacyProtection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,13 @@ const PrivacyProtection = (props) => {

const height = React.useMemo(() => {
if (!props.height) return 'auto';
if (isNumber(parseInt(props.height))) return `${props.height}px`;
return props.height;
try {
const height = parseInt(props.height);
if (isNumber(height) && !isNaN(height)) return `${props.height}px`;
} catch {}
return 'auto';
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [props.height]);

React.useEffect(() => {
if (bgImg) {
Expand Down

0 comments on commit 0e5ff1e

Please sign in to comment.