**
- script.js:153未捕获的TypeError:无法设置属性“显示”
- 未定义
- 在script.js:153
- 在NodeList.forEach()
- 在HTMLSelectElement.filterTodo(script.js:150)
**
请我继续收到此错误
enter code here function filterTodo(e) {
let todos = todoList.childNodes;
todos.forEach(function(todo) {
switch (e.target.value) {
case "all":
todo.style.display = "flex";
break;
case "completed":
if (todo.classList.contains("completed")) {
todo.style.display = "flex";
} else {
todo.style.display = "none";
}
break;
case "uncompleted":
if (!todo.classList.contains("completed")) {
todo.style.display = "flex";
} else {
todo.style.display = "none";
}
}
});
}