File tree 1 file changed +5
-11
lines changed
1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,11 @@ export const policyOutputs = {
45
45
} ;
46
46
47
47
export function getPolicyOutputTree ( countryId , searchParams = { } ) {
48
- // Helper to safely check if a URL parameter exists
49
- const hasParam = ( param ) => {
50
- if ( ! searchParams ) return false ;
51
- if ( typeof searchParams . get === "function" ) {
52
- return ! ! searchParams . get ( param ) ;
53
- }
54
- return ! ! searchParams [ param ] ;
55
- } ;
56
- const uk_local_areas_beta = hasParam ( "uk_local_areas_beta" )
57
- ? searchParams . get ( "uk_local_areas_beta" )
58
- : false ;
48
+ // Checks if UK local areas is explicitly enabled in the URl Parameter
49
+ const uk_local_areas_beta =
50
+ searchParams && typeof searchParams . get === "function"
51
+ ? searchParams . get ( "uk_local_areas_beta" ) === "true"
52
+ : false ;
59
53
60
54
const tree = [
61
55
{
You can’t perform that action at this time.
0 commit comments