Skip to content

Commit 3a120f5

Browse files
authored
レビュー反映 (フォーマットは明日します)
1 parent e00cf67 commit 3a120f5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/2-browser-apps/06-project/index.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ const todoList = document.getElementById("todo-list");
269269
const todoInput = document.getElementById("todo-input");
270270
const addButton = document.getElementById("add-button");
271271

272-
todoInput.oninput = () => (addButton.disabled = todoInput === "");
272+
todoInput.oninput = () => {
273+
addButton.disabled = todoInput.value === "";
274+
};
273275

274276
addButton.onclick = () => {
275277
const todoItem = document.createElement("li");
@@ -281,7 +283,7 @@ addButton.onclick = () => {
281283
editButton.textContent = "編集";
282284
editButton.onclick = () => {
283285
const input = prompt("編集内容を入力してください");
284-
// prompt が空で入力された場合は空文字列 ("")、キャンセルされた場合は null を返す
286+
// prompt で入力された文字列が空の場合は空文字列 ("")、キャンセルされた場合は null を返す
285287
if (input !== "" && input !== null) todoText.textContent = input;
286288
};
287289
deleteButton.textContent = "削除";

0 commit comments

Comments
 (0)