File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
app/component/itinerary/navigator Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -86,13 +86,14 @@ function NaviCardContainer(
86
86
} ;
87
87
88
88
// track only relevant vehicles for the journey.
89
- const topics = getTopics (
90
- legs . filter ( leg => legTime ( leg . end ) >= time ) ,
91
- config ,
92
- ) ;
89
+ const getNaviTopics = ( ) =>
90
+ getTopics (
91
+ legs . filter ( leg => legTime ( leg . end ) >= time ) ,
92
+ config ,
93
+ ) ;
93
94
94
95
useEffect ( ( ) => {
95
- updateClient ( topics , context ) ;
96
+ updateClient ( getNaviTopics ( ) , context ) ;
96
97
} , [ ] ) ;
97
98
98
99
useEffect ( ( ) => {
@@ -129,7 +130,7 @@ function NaviCardContainer(
129
130
}
130
131
let timeoutId ;
131
132
if ( legChanged ) {
132
- updateClient ( topics , context ) ;
133
+ updateClient ( getNaviTopics ( ) , context ) ;
133
134
setCardExpanded ( false ) ;
134
135
setLegChanging ( true ) ;
135
136
timeoutId = setTimeout ( ( ) => {
You can’t perform that action at this time.
0 commit comments