File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,14 @@ const Features = (() => {
65
65
return 'category_' + category_name . split ( " " ) . join ( "_" ) ;
66
66
}
67
67
68
+ function featureIsDisabledByDefault ( feature_label ) {
69
+ return getOptionByLabel ( feature_label ) . default == 0 ;
70
+ }
71
+
72
+ function featureisEnabledByDefault ( feature_label ) {
73
+ return ! featureIsDisabledByDefault ( feature_label ) ;
74
+ }
75
+
68
76
function updateDefaults ( defines_array ) {
69
77
// updates default on the basis of define array passed
70
78
// the define array consists define in format, EXAMPLE_DEFINE or !EXAMPLE_DEFINE
@@ -210,7 +218,7 @@ const Features = (() => {
210
218
function applyDefaults ( ) {
211
219
features . forEach ( category => {
212
220
category [ 'options' ] . forEach ( option => {
213
- const check = option [ 'default' ] == 1 ;
221
+ const check = featureisEnabledByDefault ( option . label ) ;
214
222
checkUncheckOptionByLabel ( option . label , check ) ;
215
223
} ) ;
216
224
} ) ;
You can’t perform that action at this time.
0 commit comments