Commit 5a90892 1 parent 5af2842 commit 5a90892 Copy full SHA for 5a90892
File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -213,9 +213,8 @@ import * as util from './util.js';
213
213
requestAnimationFrame ( cloneValue ) ;
214
214
215
215
const save = ( newValue ) => {
216
- latestValue = newValue ;
217
-
218
216
requestAnimationFrame ( ( ) => {
217
+ latestValue = newValue ;
219
218
const isEqual = util . deepEqual ( value , newValue ) ;
220
219
if ( chrome . options . opts . autoSave ) {
221
220
if ( ! isEqual ) {
@@ -257,6 +256,10 @@ import * as util from './util.js';
257
256
258
257
if ( value === undefined && option . default != null ) {
259
258
value = option . default ;
259
+ if ( ( ! option . type || option . type === 'checkbox' ) &&
260
+ option . options && typeof value === 'boolean' ) {
261
+ value = { enabled : value } ;
262
+ }
260
263
if ( chrome . options . opts . saveDefaults ) {
261
264
save ( value ) ;
262
265
}
You can’t perform that action at this time.
0 commit comments