mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-02 04:00:36 +00:00
Update src/app/tasks.coffee
20/02/13 Added a check for undefined value, more at https://github.com/lefnire/habitrpg/issues/463 -lancemanfv
This commit is contained in:
parent
14fb52c11e
commit
5142a78bee
1 changed files with 3 additions and 3 deletions
|
|
@ -43,8 +43,8 @@ module.exports.app = (appExports, model) ->
|
||||||
list = model.at "_#{type}List"
|
list = model.at "_#{type}List"
|
||||||
newModel = model.at('_new' + type.charAt(0).toUpperCase() + type.slice(1))
|
newModel = model.at('_new' + type.charAt(0).toUpperCase() + type.slice(1))
|
||||||
text = newModel.get()
|
text = newModel.get()
|
||||||
# Don't add a blank task
|
# Don't add a blank task; 20/02/13 Added a check for undefined value, more at issue #463 -lancemanfv
|
||||||
if /^(\s)*$/.test(text)
|
if /^(\s)*$/.test(text) || text == undefined
|
||||||
console.error "Task text entered was an empty string."
|
console.error "Task text entered was an empty string."
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue