Stop nesting ternaries in JavaScript - eviltoast