File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
components/src/navigation/nav-item Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -157,12 +157,12 @@ export class TimeRangeService {
157157 }
158158
159159 public toQueryParams ( timeRange : TimeRange , refreshTimeOnNavigationParam ?: boolean ) : QueryParamObject {
160- let queryParams : QueryParamObject = {
160+ const queryParams : QueryParamObject = {
161161 [ TimeRangeService . TIME_RANGE_QUERY_PARAM ] : timeRange . toUrlString ( )
162162 } ;
163163
164164 if ( refreshTimeOnNavigationParam ) {
165- queryParams = { ...queryParams , [ TimeRangeService . REFRESH_ON_NAVIGATION ] : true } ;
165+ return { ...queryParams , [ TimeRangeService . REFRESH_ON_NAVIGATION ] : true } ;
166166 }
167167
168168 return queryParams ;
Original file line number Diff line number Diff line change @@ -58,22 +58,17 @@ export class NavItemComponent {
5858 public readonly navItemViewStyle ?: NavViewStyle ;
5959
6060 public buildNavigationParam = ( item : NavItemLinkConfig ) : NavigationParams => {
61- let navParams : NavigationParams = {
61+ const navParams : NavigationParams = {
6262 navType : NavigationParamsType . InApp ,
6363 path : item . matchPaths [ 0 ] ,
6464 relativeTo : this . activatedRoute ,
6565 replaceCurrentHistory : item . replaceCurrentHistory
6666 } ;
6767
6868 if ( this . config . pageLevelTimeRangeIsEnabled && this . config . timeRangeResolver ) {
69- const timeRange = this . config . timeRangeResolver ( ) ;
70- const timeRangeQueryParam = this . timeRangeService . toQueryParams ( timeRange , true ) ;
71-
72- navParams = {
69+ return {
7370 ...navParams ,
74- queryParams : {
75- ...timeRangeQueryParam
76- }
71+ queryParams : this . timeRangeService . toQueryParams ( this . config . timeRangeResolver ( ) , true )
7772 } ;
7873 }
7974
You can’t perform that action at this time.
0 commit comments