13: Done Edit by Empty

If the todo title value is empty after editing, destroy the todo.

  1. Update doneEdit invocation.

<body>
  <section class="todoapp"


      doneEdit (_, payload, meta) {


        const newTitle = meta._.$.value.trim()
        if (newTitle) {
          todo.title = newTitle
        } else {
          this.todos.splice(payload.index, 1)
        }
      },

    }"
  ::>



  </section>
</body>
</html>