File tree Expand file tree Collapse file tree 6 files changed +18
-18
lines changed
Expand file tree Collapse file tree 6 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,9 @@ window.settings = {
5656 return Promise . all ( keys . map ( async key => // resolve promise when all keys load
5757 config [ key ] = ( await chrome . storage . local . get ( key ) ) [ key ] ?? initDefaultVal ( key ) ) )
5858 function initDefaultVal ( key ) {
59- return this . controls [ key ] ?. defaultVal
60- ?? this . controls [ key ] ?. type == 'slider' ? 100
61- : this . controls [ key ] ?. type == 'toggle'
59+ return this . controls ?. [ key ] ?. defaultVal
60+ ?? this . controls ?. [ key ] ?. type == 'slider' ? 100
61+ : this . controls ?. [ key ] ?. type == 'toggle'
6262 }
6363 } ,
6464
Original file line number Diff line number Diff line change @@ -56,9 +56,9 @@ window.settings = {
5656 return Promise . all ( keys . map ( async key => // resolve promise when all keys load
5757 config [ key ] = ( await chrome . storage . local . get ( key ) ) [ key ] ?? initDefaultVal ( key ) ) )
5858 function initDefaultVal ( key ) {
59- return this . controls [ key ] ?. defaultVal
60- ?? this . controls [ key ] ?. type == 'slider' ? 100
61- : this . controls [ key ] ?. type == 'toggle'
59+ return this . controls ?. [ key ] ?. defaultVal
60+ ?? this . controls ?. [ key ] ?. type == 'slider' ? 100
61+ : this . controls ?. [ key ] ?. type == 'toggle'
6262 }
6363 } ,
6464
Original file line number Diff line number Diff line change @@ -85,9 +85,9 @@ window.settings = {
8585 return Promise . all ( keys . map ( async key => // resolve promise when all keys load
8686 config [ key ] = ( await chrome . storage . local . get ( key ) ) [ key ] ?? initDefaultVal ( key ) ) )
8787 function initDefaultVal ( key ) {
88- return this . controls [ key ] ?. defaultVal
89- ?? this . controls [ key ] ?. type == 'slider' ? 100
90- : this . controls [ key ] ?. type == 'toggle'
88+ return this . controls ?. [ key ] ?. defaultVal
89+ ?? this . controls ?. [ key ] ?. type == 'slider' ? 100
90+ : this . controls ?. [ key ] ?. type == 'toggle'
9191 }
9292 } ,
9393
Original file line number Diff line number Diff line change @@ -85,9 +85,9 @@ window.settings = {
8585 return Promise . all ( keys . map ( async key => // resolve promise when all keys load
8686 config [ key ] = ( await chrome . storage . local . get ( key ) ) [ key ] ?? initDefaultVal ( key ) ) )
8787 function initDefaultVal ( key ) {
88- return this . controls [ key ] ?. defaultVal
89- ?? this . controls [ key ] ?. type == 'slider' ? 100
90- : this . controls [ key ] ?. type == 'toggle'
88+ return this . controls ?. [ key ] ?. defaultVal
89+ ?? this . controls ?. [ key ] ?. type == 'slider' ? 100
90+ : this . controls ?. [ key ] ?. type == 'toggle'
9191 }
9292 } ,
9393
Original file line number Diff line number Diff line change @@ -142,9 +142,9 @@ window.settings = {
142142 config [ key ] = result [ `${ env . site } _${ key } ` ] ?? result [ key ] ?? initDefaultVal ( key )
143143 } ) )
144144 function initDefaultVal ( key ) {
145- return this . controls [ key ] ?. defaultVal
146- ?? this . controls [ key ] ?. type == 'slider' ? 100
147- : this . controls [ key ] ?. type == 'toggle'
145+ return this . controls ?. [ key ] ?. defaultVal
146+ ?? this . controls ?. [ key ] ?. type == 'slider' ? 100
147+ : this . controls ?. [ key ] ?. type == 'toggle'
148148 }
149149 } ,
150150
Original file line number Diff line number Diff line change @@ -142,9 +142,9 @@ window.settings = {
142142 config [ key ] = result [ `${ env . site } _${ key } ` ] ?? result [ key ] ?? initDefaultVal ( key )
143143 } ) )
144144 function initDefaultVal ( key ) {
145- return this . controls [ key ] ?. defaultVal
146- ?? this . controls [ key ] ?. type == 'slider' ? 100
147- : this . controls [ key ] ?. type == 'toggle'
145+ return this . controls ?. [ key ] ?. defaultVal
146+ ?? this . controls ?. [ key ] ?. type == 'slider' ? 100
147+ : this . controls ?. [ key ] ?. type == 'toggle'
148148 }
149149 } ,
150150
You can’t perform that action at this time.
0 commit comments