ternary statement not working
added javascript line