Skip to content

Commit 7323d8a

Browse files
authored
fix: Handle empty footer logo scenario (#3094)
## What's the purpose of this pull request? With these changes, if merchants remove the footer logo the entire footer component will not be hid anymore, it will throw a console error but the component should be displayed with no logo.
1 parent ff808f5 commit 7323d8a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/core/src/components/ui/Logo/Logo.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ interface LogoProps {
88
}
99

1010
function Logo({ alt, src, loading = 'lazy' }: LogoProps) {
11+
if (!src) {
12+
console.error('Logo image src is required.')
13+
return null
14+
}
15+
1116
return (
1217
<div data-fs-logo>
1318
<Image

0 commit comments

Comments
 (0)