should be `if` instead of ternary operator.