In my program i'm just checking to see if the user changes anything in the front end on my server. While I run the code below, it seems that it only checks the first case and that's it. Iv come to this conclusion because iv I rearranged what is beings checked first, only the first one will be checked. The inside logic works fine as iv tested it while rearranging.
case("Pizza Slice w/ Topping" || "Small Pie w/ Topping" || "Large Pie w/ Topping":{
if(it.comboDrink || it.comboSide || !checkToppings(it) ){
let customErr = new customError('Y U TOUCH ME PIZZA!');
throw customErr;
}
break;
For example right now the inside if statement only runs for "Pizza Slice w/ Topping", and not anything else. Now when I put "Small Pie w/ Topping" first in my case, it only works for "Small Pie w/ Topping" and nothing else. Iv rewritten this whole statement in case there was some invisible characters. I have a similar set up checking other things in this switch statement and they work fine.