I'd wrap conditions in `()` for readability, especially with a nested ternary