Skip to content

Commit

Permalink
Problem: indexof() do not catch the substr item in SUB_DOMAINS
Browse files Browse the repository at this point in the history
Solution: switch to some
  • Loading branch information
Nicole Emer committed Sep 6, 2024
1 parent dd84d3e commit feebe02
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions extensions/cmp/cmp_custom_vendor_mapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
const SUB_DOMAINS = ['sportbild', 'shop.welt.de', 'bildplusshop.bild.de'];
const CLUB_DOMAIN = ['club'];

const NEW_STORAGE_KEY = (CLUB_DOMAIN.indexOf(window.location.hostname) >-1) ?
'cmp_cv_list_club' :
(SUB_DOMAINS.indexOf(window.location.hostname) >-1 ?
'cm_cv_list' :
'cmp_cv_list'
);
const NEW_STORAGE_KEY = (CLUB_DOMAIN.some(domain => window.location.hostname.includes(domain))) ?
'cmp_cv_list_club' :

Check failure on line 8 in extensions/cmp/cmp_custom_vendor_mapping.js

View workflow job for this annotation

GitHub Actions / Run Unit Tests

Expected indentation of 8 spaces but found 4
(SUB_DOMAINS.some(domain => window.location.hostname.includes(domain)) ?

Check failure on line 9 in extensions/cmp/cmp_custom_vendor_mapping.js

View workflow job for this annotation

GitHub Actions / Run Unit Tests

Expected indentation of 8 spaces but found 4
'cm_cv_list' :

Check failure on line 10 in extensions/cmp/cmp_custom_vendor_mapping.js

View workflow job for this annotation

GitHub Actions / Run Unit Tests

Expected indentation of 12 spaces but found 8
'cmp_cv_list'

Check failure on line 11 in extensions/cmp/cmp_custom_vendor_mapping.js

View workflow job for this annotation

GitHub Actions / Run Unit Tests

Expected indentation of 12 spaces but found 8
);

Check failure on line 12 in extensions/cmp/cmp_custom_vendor_mapping.js

View workflow job for this annotation

GitHub Actions / Run Unit Tests

Expected indentation of 8 spaces but found 4

// Vendor Array for Bild and Welt
const vendorArray = [
Expand Down

0 comments on commit feebe02

Please sign in to comment.