diff --git a/content/docs/en/getting-started/2-playground-tutorial.md b/content/docs/en/getting-started/2-playground-tutorial.md index e2348d95..06553731 100644 --- a/content/docs/en/getting-started/2-playground-tutorial.md +++ b/content/docs/en/getting-started/2-playground-tutorial.md @@ -229,6 +229,7 @@ new Vue({ console.log('Task with index: ' + args.index + ' tapped'); // Logs tapped tasks in the console for debugging. }, onButtonTap() { + if (this.textFieldValue === "") return; // Prevents users from entering an empty string. console.log("New task added: " + this.textFieldValue + "."); // Logs the newly added task in the console for debugging. this.todos.unshift({ name: this.textFieldValue }); // Adds tasks in the ToDo array. Newly added tasks are immediately shown on the screen. this.textFieldValue = ""; // Clears the text field so that users can start adding new tasks immediately. @@ -638,7 +639,7 @@ To implement a style particularly for the text of active tasks, you can set an ` 1. In `app.js`, on line 67, set an `id` for the `