fix(admin-ui): ensure that sales channel names are always an array (#4049)
This commit is contained in:
1 parent
2829537592
commit
aa74ebb181
2 files changed
+9
-4
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/admin-ui": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(admin-ui): ensure that sales channel names are always an array
|
||||||
@@ -27,11 +27,11 @@ const useProductTableColumn = ({ setTileView, setListView, showList }) => {
|
|||||||
const { store } = useAdminStore()
|
const { store } = useAdminStore()
|
||||||
|
|
||||||
const getProductSalesChannels = (salesChannels) => {
|
const getProductSalesChannels = (salesChannels) => {
|
||||||
;(salesChannels || []).sort(
|
const salesChannelsNames = (salesChannels || [])
|
||||||
defaultChannelsSorter(store?.default_sales_channel_id || "")
|
.sort(defaultChannelsSorter(store?.default_sales_channel_id || ""))
|
||||||
)
|
.map((sc) => sc.name)
|
||||||
|
|
||||||
return <DelimitedList list={salesChannels.map((sc) => sc.name)} />
|
return <DelimitedList list={salesChannelsNames} />
|
||||||
}
|
}
|
||||||
|
|
||||||
const columns = useMemo(
|
const columns = useMemo(
|
||||||
|
|||||||
Reference in new issue
Block a user