File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -196,16 +196,18 @@ const getKeyPath = (parentKey, option) => {
196196 ( parentKey && option . name ? '.' : '' ) + ( option . name || '' ) ;
197197} ;
198198
199- const addOptions = ( value , save , option , key ) => {
200- if ( value == null || typeof value !== 'object' ) {
201- value = { } ;
199+ const addOptions = ( values , save , option , key ) => {
200+ if ( values == null || typeof values !== 'object' ) {
201+ values = { } ;
202202 }
203203 return h ( '.suboptions' , option . options . map ( ( option ) => {
204204 const optionKey = getKeyPath ( key , option ) ;
205- return chrome . options . addOption ( optionKey , value [ option . name ] ,
205+ const isLayout = option . type === 'column' || option . type === 'row' ;
206+ const value = isLayout ? values : values [ option . name ] ;
207+ return chrome . options . addOption ( optionKey , value ,
206208 ( newValue ) => {
207- if ( option . name ) { value [ option . name ] = newValue ; }
208- save ( value ) ;
209+ if ( option . name ) { values [ option . name ] = newValue ; }
210+ save ( values ) ;
209211 } , option ) ;
210212 } ) ) ;
211213} ;
You can’t perform that action at this time.
0 commit comments