File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -122,15 +122,28 @@ const getValue = (element) => {
122
122
value = localStorage . getItem ( 'clientId' )
123
123
else if ( value === '$session_id' )
124
124
value = localStorage . getItem ( 'session_id' )
125
- else if ( [
125
+ else if ( value . startsWith ( '$search' ) ) {
126
+ const searchParams = new URLSearchParams ( window . location . search ) ;
127
+ if ( value . includes ( '.' ) ) {
128
+ value = searchParams . get ( value . split ( '.' ) [ 1 ] ) ;
129
+ } else {
130
+ const paramsObject = { } ;
131
+
132
+ // Iterate over all key-value pairs and add them to the object
133
+ for ( const [ key , value ] of searchParams ) {
134
+ paramsObject [ key ] = value ;
135
+ }
136
+ value = paramsObject
137
+ }
138
+
139
+ } else if ( [
126
140
'$href' ,
127
141
'$origin' ,
128
142
'$protocol' ,
129
143
'$host' ,
130
144
'$hostname' ,
131
145
'$port' ,
132
146
'$pathname' ,
133
- '$search' ,
134
147
'$hash'
135
148
] . includes ( value ) ) {
136
149
value = window . location [ value . substring ( 1 ) ]
You can’t perform that action at this time.
0 commit comments