From 7155fe6da6fbc4105943921dda83c47eb349cacb Mon Sep 17 00:00:00 2001 From: Mudit Juneja Date: Thu, 14 Mar 2024 02:04:56 +0530 Subject: [PATCH] Checking for 'false' as the props are coming as string --- packages/gatsby-theme-carbon/src/components/Code/Code.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/gatsby-theme-carbon/src/components/Code/Code.js b/packages/gatsby-theme-carbon/src/components/Code/Code.js index 09e538e0f..c282d3c34 100755 --- a/packages/gatsby-theme-carbon/src/components/Code/Code.js +++ b/packages/gatsby-theme-carbon/src/components/Code/Code.js @@ -45,8 +45,8 @@ const Code = ({ children, className: classNameProp = '', metaData }) => { setSrc(metaDataObject.src); } - if (metaDataObject.hideCode) { - setHideCode(true); + if (metaDataObject.hideCode === 'false' || metaDataObject.hideCode === '0') { + setHideCode(false); } } }, [metaData]);