Skip to content

Commit 31b6f4a

Browse files
authored
Merge pull request #597 from ut-code/fix-todo
null 追加
2 parents ba8a2be + 7d4f26d commit 31b6f4a

File tree

1 file changed

+1
-1
lines changed
  • docs/2-browser-apps/06-project/_samples/todo

1 file changed

+1
-1
lines changed

docs/2-browser-apps/06-project/_samples/todo/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ addButton.onclick = () => {
1414
editButton.textContent = "編集";
1515
editButton.onclick = () => {
1616
const input = prompt("新しい内容を入力してください。");
17-
if (input !== "") todoText.textContent = input;
17+
if (input !== "" && input !== null) todoText.textContent = input;
1818
};
1919
deleteButton.textContent = "削除";
2020
deleteButton.onclick = () => {

0 commit comments

Comments
 (0)