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) => {
122122 value = localStorage . getItem ( 'clientId' )
123123 else if ( value === '$session_id' )
124124 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 ( [
126140 '$href' ,
127141 '$origin' ,
128142 '$protocol' ,
129143 '$host' ,
130144 '$hostname' ,
131145 '$port' ,
132146 '$pathname' ,
133- '$search' ,
134147 '$hash'
135148 ] . includes ( value ) ) {
136149 value = window . location [ value . substring ( 1 ) ]
You can’t perform that action at this time.
0 commit comments