Fixed JS error in todo app.