File tree Expand file tree Collapse file tree 1 file changed +10
-20
lines changed Expand file tree Collapse file tree 1 file changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -571,18 +571,7 @@ class AppOptions {
571571 }
572572
573573 static set ( name , value ) {
574- const defaultOpt = defaultOptions [ name ] ;
575-
576- if (
577- ! defaultOpt ||
578- ! (
579- typeof value === typeof defaultOpt . value ||
580- Type [ ( typeof value ) . toUpperCase ( ) ] & defaultOpt . type
581- )
582- ) {
583- return ;
584- }
585- userOptions . set ( name , value ) ;
574+ this . setAll ( { [ name ] : value } ) ;
586575 }
587576
588577 static setAll ( options , prefs = false ) {
@@ -601,15 +590,16 @@ class AppOptions {
601590 ) {
602591 continue ;
603592 }
604- if ( prefs ) {
605- const { kind } = defaultOpt ;
593+ const { kind } = defaultOpt ;
606594
607- if ( ! ( kind & OptionKind . BROWSER || kind & OptionKind . PREFERENCE ) ) {
608- continue ;
609- }
610- if ( this . eventBus && kind & OptionKind . EVENT_DISPATCH ) {
611- ( events ||= new Map ( ) ) . set ( name , userOpt ) ;
612- }
595+ if (
596+ prefs &&
597+ ! ( kind & OptionKind . BROWSER || kind & OptionKind . PREFERENCE )
598+ ) {
599+ continue ;
600+ }
601+ if ( this . eventBus && kind & OptionKind . EVENT_DISPATCH ) {
602+ ( events ||= new Map ( ) ) . set ( name , userOpt ) ;
613603 }
614604 userOptions . set ( name , userOpt ) ;
615605 }
You can’t perform that action at this time.
0 commit comments