The goal is to check a URL or Cookie for the given set of values, and if not found; move to the If Else statement where language is verified. Everything works fine when the initial IF statement is removed. However, when like this; the else if is not reached
if (["ccov", "top10", "cenf", "aip", "constructioncoverage", "seniorliving", "aginginplace", "seniorlist"].some((value) => ref1.includes(value)) || ["ccov", "top10", "cenf", "aip"].some((value2) => getcookie('track-page-1').includes(value2))) {
s1.src = 'https://embed.tawk.to/620675459bd1f31184dc28c0/1frkjk5mj';
} else if (userLang.match(/^en/)) {
s1.src = 'https://embed.tawk.to/60a7b623b1d5182476bb3457/1f67huun6';
}
It is likely I have a misunderstanding of some.(value). Then again, the IF statement is working perfectly.. However the else if is never engaged when IF is false
I have tried changing "else if" to just "if" and it still does not work