fix(admin-ui): ensure that sales channel names are always an array (#4049)
This commit is contained in:
5
.changeset/breezy-cougars-tap.md
Normal file
5
.changeset/breezy-cougars-tap.md
Normal file
@@ -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 getProductSalesChannels = (salesChannels) => {
|
||||
;(salesChannels || []).sort(
|
||||
defaultChannelsSorter(store?.default_sales_channel_id || "")
|
||||
)
|
||||
const salesChannelsNames = (salesChannels || [])
|
||||
.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(
|
||||
|
||||
Reference in New Issue
Block a user