Merge pull request #1333 from mirumee/SALEOR-4278/3.0/product-view-channel-search-fix
fix dashboard crash when using the channel selector search field in product view
This commit is contained in:
parent
0cdcec4476
commit
de0811e2d5
1 changed files with 7 additions and 1 deletions
|
@ -136,7 +136,13 @@ const ChannelsWithVariantsAvailabilityDialogContent: React.FC<ChannelsWithVarian
|
|||
return (
|
||||
<>
|
||||
{map(channelsWithVariants, ({ selectedVariantsIds }, channelId) => {
|
||||
const { name } = channels.find(getById(channelId));
|
||||
const filteredChannel = channels.find(getById(channelId));
|
||||
|
||||
if (!filteredChannel) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { name } = filteredChannel;
|
||||
|
||||
const isVariantSelected = (variantId: string) =>
|
||||
selectedVariantsIds.includes(variantId);
|
||||
|
|
Loading…
Reference in a new issue