From 8bdfb95708b263b48f801b241a0941f889023e46 Mon Sep 17 00:00:00 2001 From: nileshgulia1 Date: Tue, 4 Jun 2024 11:13:03 +0530 Subject: [PATCH] fix: use parseInt --- src/PrivacyProtection/PrivacyProtection.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PrivacyProtection/PrivacyProtection.jsx b/src/PrivacyProtection/PrivacyProtection.jsx index b0f969b..c0c0f85 100644 --- a/src/PrivacyProtection/PrivacyProtection.jsx +++ b/src/PrivacyProtection/PrivacyProtection.jsx @@ -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]);