Trying to find syntax error in template JS