I find the ternary hard to read in this case. I'd suggest wrapping it in parentheses.