mirror of https://github.com/xwiki-labs/cryptpad
don't create empty todo entries
This commit is contained in:
parent
e84edb2c2b
commit
69eaccbdef
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue