File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -617,16 +617,17 @@ class Toolbar {
617617 }
618618
619619 renderThemeSelectIcon ( themeBox , themes ) {
620- const icon = document . getElementById ( "themeSelectIcon" ) ;
620+ const icon = docById ( "themeSelectIcon" ) ;
621+ if ( ! icon ) return ;
622+
621623 themes . forEach ( theme => {
622624 if ( localStorage . themePreference === theme ) {
623- icon . innerHTML = document . getElementById ( theme ) . innerHTML ;
625+ icon . innerHTML = docById ( theme ) . innerHTML ;
624626 }
625627 } ) ;
626- const themeSelectIcon = docById ( "themeSelectIcon" ) ;
627- const themeList = themes ;
628- themeSelectIcon . onclick = ( ) => {
629- themeList . forEach ( theme => {
628+
629+ icon . onclick = ( ) => {
630+ themes . forEach ( theme => {
630631 docById ( theme ) . onclick = ( ) => themeBox [ `${ theme } _onclick` ] ( this . activity ) ;
631632 } ) ;
632633 } ;
You can’t perform that action at this time.
0 commit comments