File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,15 @@ const TopcoderHeader = ({ auth }) => {
30
30
31
31
// if there's a stored nav type in session storage, retrieve it and overwrite type
32
32
const sessionNavType = sessionStorage . getItem ( 'uni-nav[navType]' ) ;
33
- const url = window . location . pathname ;
33
+ const url = new URL ( window . location . href ) ;
34
34
35
- //Only use the set sessionStorage value for navType on the /thrive paths, for now. Probably will change in the future...
35
+ // Only use the set sessionStorage value for navType on the /thrive paths, for now.
36
+ // Probably will change in the future...
36
37
if ( url . includes ( '/thrive' ) && sessionNavType && ( sessionNavType === 'tool' || sessionNavType === 'marketing' ) ) {
37
38
type = sessionNavType ;
38
39
}
39
40
40
41
// If url contains navTool url parameter. Overwrite settings with parameter.
41
- const url = new URL ( window . location . href ) ;
42
42
const urlParams = new URLSearchParams ( url . search ) ;
43
43
if ( urlParams . get ( 'navTool' ) ) {
44
44
type = urlParams . get ( 'navTool' ) ;
You can’t perform that action at this time.
0 commit comments