don't create empty todo entries

This commit is contained in:
ansuz 2017-07-26 15:22:25 +02:00
parent e84edb2c2b
commit 69eaccbdef
1 changed files with 4 additions and 0 deletions

View File

@ -124,6 +124,10 @@ define([
var addTask = function () {
var $input = $iframe.find('#newTodoName');
// if the input is empty after removing leading and trailing spaces
// don't create a new entry
if (!$input.val().trim()) { return; }
var obj = {
"state": 0,
"task": $input.val(),