fix state.update not destroy when edit text blank

if (state.editing.title === "") should call state.destroy() instead of destroy()
This commit is contained in:
Gampol T 2017-02-23 17:45:25 +07:00 committed by GitHub
parent 1a4bcc44e6
commit f6e627a891

View file

@ -38,7 +38,7 @@ var state = {
update: function(title) {
if (state.editing != null) {
state.editing.title = title.trim()
if (state.editing.title === "") destroy(state.editing)
if (state.editing.title === "") state.destroy(state.editing)
state.editing = null
}
},