File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
site/src/pages/DeploymentSettingsPage Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,15 @@ describe("optionValue", () => {
120120 additionalValues : [ "single_tailnet" ] ,
121121 expected : { single_tailnet : true } ,
122122 } ,
123+ {
124+ option : {
125+ ...defaultOption ,
126+ name : "Experiments" ,
127+ value : null ,
128+ } ,
129+ additionalValues : [ "single_tailnet" ] ,
130+ expected : "" ,
131+ } ,
123132 {
124133 option : {
125134 ...defaultOption ,
Original file line number Diff line number Diff line change @@ -40,8 +40,10 @@ export function optionValue(
4040 case "Experiments" : {
4141 const experimentMap = additionalValues ?. reduce < Record < string , boolean > > (
4242 ( acc , v ) => {
43- // biome-ignore lint/suspicious/noExplicitAny: opt.value is any
44- acc [ v ] = ( option . value as any ) . includes ( "*" ) ;
43+ const isIncluded = Array . isArray ( option . value )
44+ ? option . value . includes ( "*" )
45+ : false ;
46+ acc [ v ] = isIncluded ;
4547 return acc ;
4648 } ,
4749 { } ,
@@ -57,10 +59,11 @@ export function optionValue(
5759
5860 // We show all experiments (including unsafe) that are currently enabled on a deployment
5961 // but only show safe experiments that are not.
60- // biome-ignore lint/suspicious/noExplicitAny: opt.value is any
61- for ( const v of option . value as any ) {
62- if ( v !== "*" ) {
63- experimentMap [ v ] = true ;
62+ if ( Array . isArray ( option . value ) ) {
63+ for ( const v of option . value ) {
64+ if ( v !== "*" ) {
65+ experimentMap [ v ] = true ;
66+ }
6467 }
6568 }
6669 return experimentMap ;
You can’t perform that action at this time.
0 commit comments