I need help with this error, I don't know how to correct or fix it
CodePudding user response:
Not all paths are returning a string. Or you need to declare the type of your function as string | void
or you need to add return '';
at the end of your function. Should do the trick!
CodePudding user response:
You got this error because you miss the else condition.
if(respuesta === this.opcionSeleccionada){
return 'active text-light';
}else{
//Here you need to return something.
}