Properly fallback to placeholder
This commit is contained in:
parent
3ed5cc4b9b
commit
882885f65b
1 changed files with 2 additions and 1 deletions
|
|
@ -9,7 +9,8 @@ import {
|
|||
} from '@chakra-ui/react';
|
||||
|
||||
export default ({ product }) => {
|
||||
const images = product.images.filter((x) => !!x) || ['https://dv2ls.com/f/PpMcVb8gN'];
|
||||
const filtered = product.images.filter((x) => !!x);
|
||||
const images = filtered.length ? filtered : ['https://dv2ls.com/f/PpMcVb8gN'];
|
||||
return (
|
||||
<Box
|
||||
margin="auto"
|
||||
|
|
|
|||
Loading…
Reference in a new issue