Skip to content

Commit

Permalink
fix: use parseInt
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgulia1 committed Jun 4, 2024
1 parent 388705b commit 8bdfb95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PrivacyProtection/PrivacyProtection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const PrivacyProtection = (props) => {

const height = React.useMemo(() => {
if (!props.height) return 'auto';
if (isNumber(JSON.parse(props.height))) return `${props.height}px`;
if (isNumber(parseInt(props.height))) return `${props.height}px`;
return props.height;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.height, enabled, show]);
Expand Down

0 comments on commit 8bdfb95

Please sign in to comment.