File tree Expand file tree Collapse file tree 3 files changed +262
-207
lines changed
docs/3-web-servers/14-project Expand file tree Collapse file tree 3 files changed +262
-207
lines changed Original file line number Diff line number Diff line change @@ -11,5 +11,5 @@ datasource db {
1111model Todo {
1212 id Int @id @default (autoincrement () )
1313 title String
14- dueAt DateTime ?
14+ dueAt DateTime
1515}
Original file line number Diff line number Diff line change @@ -41,11 +41,9 @@ async function loadTodos() {
4141 titleDiv . textContent = todo . title ;
4242 todoListItem . appendChild ( titleDiv ) ;
4343
44- if ( todo . dueAt ) {
45- const dueAtDiv = document . createElement ( "div" ) ;
46- dueAtDiv . textContent = new Date ( todo . dueAt ) . toLocaleString ( ) ;
47- todoListItem . appendChild ( dueAtDiv ) ;
48- }
44+ const dueAtDiv = document . createElement ( "div" ) ;
45+ dueAtDiv . textContent = new Date ( todo . dueAt ) . toLocaleString ( ) ;
46+ todoListItem . appendChild ( dueAtDiv ) ;
4947
5048 const deleteButton = document . createElement ( "button" ) ;
5149 deleteButton . textContent = "削除" ;
You can’t perform that action at this time.
0 commit comments