Skip to content

Commit f76c87a

Browse files
authored
Merge pull request #179 from jiffy-labs/handling-sentry-issues
handled TypeError in HeaderSection
2 parents 37cc679 + 7a96c6c commit f76c87a

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/components/global/HeaderSection.tsx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,21 @@ const HeaderSectionGlobal: React.FC<HeaderSectionProps> = ({
107107
)}
108108
</div>
109109
</div>
110-
{item?.address !== '' && addressMapping && addressMapping[item?.address.toLowerCase()] && POWERED_BY_LOGO_MAP[addressMapping[item?.address.toLowerCase()].company.toLowerCase()] && (
111-
<div className="md:px-[16px] px-0 md:py-[8px] py-0">
112-
<span className="text-bluegrey-300 text-[10px] leading-5 flex items-center gap-2 font-normal">
113-
Powered By{' '}
114-
<img
115-
src={POWERED_BY_LOGO_MAP[addressMapping[item?.address.toLowerCase()].company.toLowerCase()].small}
116-
style={{ height: 20, width: 20 }}
117-
alt=""
118-
/>
119-
</span>
120-
</div>
121-
)}
110+
{item?.address && typeof item.address === 'string' && addressMapping &&
111+
addressMapping[item.address.toLowerCase()] &&
112+
addressMapping[item.address.toLowerCase()].company &&
113+
POWERED_BY_LOGO_MAP[addressMapping[item.address.toLowerCase()].company.toLowerCase()] && (
114+
<div className="md:px-[16px] px-0 md:py-[8px] py-0">
115+
<span className="text-bluegrey-300 text-[10px] leading-5 flex items-center gap-2 font-normal">
116+
Powered By{' '}
117+
<img
118+
src={POWERED_BY_LOGO_MAP[addressMapping[item.address.toLowerCase()].company.toLowerCase()].small}
119+
style={{ height: 20, width: 20 }}
120+
alt=""
121+
/>
122+
</span>
123+
</div>
124+
)}
122125
</div>
123126
</div>
124127
</section>

0 commit comments

Comments
 (0)