File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
classroom/timeline/library Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ export default class IndexRoute extends Route {
20
20
21
21
for ( const section of sections . toArray ( ) ) {
22
22
const contents = await section . get ( 'contents' )
23
- const contentArray = contents . filter ( ( content , index , self ) => content . get ( "id" ) == contentId )
24
- if ( contentArray . length ) {
25
- sectionId = section . get ( "id" )
26
- break
27
- }
23
+ const content = contents . findBy ( "id" , contentId )
24
+ if ( content ) {
25
+ sectionId = section . get ( "id" )
26
+ break
27
+ }
28
28
}
29
29
this . transitionTo (
30
30
"attempt.content" ,
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ export default class ClassroomTimelineLibraryController extends Controller {
31
31
{
32
32
name : 'Doubts' ,
33
33
component : 'course-library/doubts' ,
34
- task : this . fetchDoubts
34
+ task : this . fetchDoubts ,
35
+ option :true
35
36
}
36
37
] ;
37
38
Original file line number Diff line number Diff line change 5
5
@onTabChange ={{ action " changeTab" }}
6
6
>
7
7
<WAsync @task ={{ activeTab.task }} @autoFire ={{ true }} as |result|>
8
- {{ component activeTab.component runAttempt =runAttempt payload =result option =true class =" border-bottom-list my-5" }}
8
+ {{ component activeTab.component runAttempt =runAttempt payload =result option =activeTab.option class =" border-bottom-list my-5" }}
9
9
</WAsync >
10
10
</WTabNav >
11
11
You can’t perform that action at this time.
0 commit comments