Showing
1 changed file
with
7 additions
and
2 deletions
@@ -43,8 +43,13 @@ const _processBrandNames = (list) => { | @@ -43,8 +43,13 @@ const _processBrandNames = (list) => { | ||
43 | brandName: obj.brandDomain && obj.brandName.toLowerCase() | 43 | brandName: obj.brandDomain && obj.brandName.toLowerCase() |
44 | }); | 44 | }); |
45 | 45 | ||
46 | - brandDomainMap[obj.brandDomain.toLowerCase()] = obj.brandDomain.toLowerCase(); | ||
47 | - brandNameMap[obj.brandName.toLowerCase()] = obj.brandDomain.toLowerCase(); | 46 | + if (obj && obj.brandDomain) { |
47 | + brandDomainMap[obj.brandDomain.toLowerCase()] = obj.brandDomain.toLowerCase(); | ||
48 | + } | ||
49 | + | ||
50 | + if (obj && obj.brandName && obj.brandDomain) { | ||
51 | + brandNameMap[obj.brandName.toLowerCase()] = obj.brandDomain.toLowerCase(); | ||
52 | + } | ||
48 | }); | 53 | }); |
49 | }); | 54 | }); |
50 | 55 |
-
Please register or login to post a comment