File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/routes/workbooks/edit/[slug] Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 4141
4242 // HACK: $effect だと workBookTasksForTable が更新されない
4343 run (() => {
44- workBookTasksForTable = $form .workBookTasks .map ((workBookTask ) => {
45- const task = tasksMapByIds .get (workBookTask .taskId );
44+ workBookTasksForTable = $form .workBookTasks
45+ .map ((workBookTask ) => {
46+ const task = tasksMapByIds .get (workBookTask .taskId );
47+
48+ if (! task ) {
49+ return null ;
50+ }
4651
47- if (task ) {
4852 return {
4953 contestId: task .contest_id ,
5054 title: task .title ,
5155 taskId: workBookTask .taskId ,
5256 priority: workBookTask .priority ,
5357 comment: workBookTask .comment ,
5458 };
55- }
56- }) as WorkBookTasksEdit ;
59+ })
60+ . filter (( item ) : item is NonNullable < typeof item > => item !== null ) ;
5761 });
5862 </script >
5963
You can’t perform that action at this time.
0 commit comments