As you can see from this code:
function setBodyClasses() {
var answer = $surveyAns.getAnswer('QUEST223');
answer = 'oro';
if(!surveyUtils.isNullOrWhiteSpace(answer)) {
if (answer.toLowerCase().indexOf('oro')) {
$scope.bodyClasses = 'vip_gold';
}
else if (answer.toLowerCase().indexOf('platino')) {
$scope.bodyClasses = 'vip_platinum';
}
else {
$scope.bodyClasses = '';
}
}
}
For some reason the if else statement is not working correctly, as you can see the answer value is oro and it should stop on the first if, but when its on the first if condition it compares the value and it moves forward assuming that is not the same value, and for some other reason it enters the second if condition even though the value is different. Any idea why this is happening?