File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -193,11 +193,12 @@ export const Switches = function (switches: Record<string, any>) {
193
193
switches = switches || { } ;
194
194
let a = [ ] ;
195
195
// Set default values of boolean switches
196
- switches . so = switches . so === true ? true : false ;
197
- switches . spl = switches . spl === true ? true : false ;
198
- switches . ssc = switches . ssc === false ? false : true ;
199
- switches . ssw = switches . ssw === true ? true : false ;
200
- switches . y = switches . y === false ? false : true ;
196
+ for ( const key of [ 'so' , 'spl' , 'ssw' ] ) {
197
+ if ( switches [ key ] !== true ) switches [ key ] = false ;
198
+ }
199
+ for ( const key of [ 'ssc' , 'y' ] ) {
200
+ if ( switches [ key ] !== false ) switches [ key ] = true ;
201
+ }
201
202
202
203
/*jshint forin:false*/
203
204
for ( const s in switches ) {
You can’t perform that action at this time.
0 commit comments