2 line logic merge using ternary operator

Just merged 2 lines of logic together to make it a bit more readable.