Skip to content

Commit

Permalink
rename audience
Browse files Browse the repository at this point in the history
  • Loading branch information
renz-maban committed Jul 17, 2024
1 parent bae20ae commit fd1032c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/kits/incito-publication/bootstrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,24 @@ export default class Bootstrapper {
}

getFeatureLabels() {
const regex = new RegExp(/tjek-audience=[^#&;+]+/);
const regex = new RegExp(/tjek_audience=[^#&;+]+/);
const match = regex.exec(location.href) || [];
let feature;

if (match.length > 0) {
feature =
match[0] !== undefined
? match[0].replace('tjek-audience=', '').split(',')
? match[0].replace('tjek_audience=', '').split(',')
: ['none'];
} else if (localStorage.getItem('tjek-audience') !== null) {
feature = localStorage.getItem('tjek-audience')?.split(',') || [
} else if (localStorage.getItem('tjek_audience') !== null) {
feature = localStorage.getItem('tjek_audience')?.split(',') || [
'none'
];
} else {
const cookie = regex.exec(document.cookie) || [];
feature =
cookie[0] !== undefined
? cookie[0].replace('tjek-audience=', '').split(',')
? cookie[0].replace('tjek_audience=', '').split(',')
: ['none'];
}

Expand Down

0 comments on commit fd1032c

Please sign in to comment.