Merge pull request #4757 from devansh-webkul/issue-4755

Fixed issue in which selecting all channels from admin product list throws error #4755
This commit is contained in:
Glenn Hermans 2021-03-23 19:30:19 +01:00 committed by GitHub
commit 3141e28b01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 3 deletions

View File

@ -730,19 +730,31 @@
case "channel":
obj.label = "Channel";
if ('channels' in this.extraFilters) {
obj.prettyValue = this.extraFilters['channels'].find(channel => channel.code == obj.val).name
obj.prettyValue = this.extraFilters['channels'].find(channel => channel.code == obj.val);
if (obj.prettyValue !== undefined) {
obj.prettyValue = obj.prettyValue.name;
}
}
break;
case "locale":
obj.label = "Locale";
if ('locales' in this.extraFilters) {
obj.prettyValue = this.extraFilters['locales'].find(locale => locale.code === obj.val).name
obj.prettyValue = this.extraFilters['locales'].find(locale => locale.code === obj.val);
if (obj.prettyValue !== undefined) {
obj.prettyValue = obj.prettyValue.name;
}
}
break;
case "customer_group":
obj.label = "Customer Group";
if ('customer_groups' in this.extraFilters) {
obj.prettyValue = this.extraFilters['customer_groups'].find(customer_group => customer_group.id === parseInt(obj.val, 10)).name
obj.prettyValue = this.extraFilters['customer_groups'].find(customer_group => customer_group.id === parseInt(obj.val, 10));
if (obj.prettyValue !== undefined) {
obj.prettyValue = obj.prettyValue.name;
}
}
break;
case "sort":