[Fix] Change hasClass condition for a ternary operator