Would you mind following the existing code style and using four spaces for indentation in this if/else block.
Also, if you are going to split the arguments of the ternary operator over multiple lines can you ensure the arguments are lined up? Thanks!