File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
custom-implementation/src Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,13 @@ const render = async () => {
20
20
const theme = document . getElementsByTagName ( 'html' ) [ 0 ] . getAttribute ( 'class' )
21
21
22
22
if ( ! document . getElementById ( 'theme-switch' ) ) {
23
- if ( document . querySelector ( 'button.fern-search-bar' ) ) {
24
- const sidenav = document . querySelector ( 'button.fern-search-bar' )
25
- ?. parentElement as HTMLElement
26
- const wrapper = document . createElement ( 'div' )
27
- wrapper . setAttribute ( 'id' , 'theme-switch' )
28
- sidenav . appendChild ( wrapper )
29
- ReactDOM . render ( React . createElement ( ThemeSwitch ) , wrapper )
30
- }
23
+ const sidenav = document . querySelector ( 'button.fern-search-bar' )
24
+ ?. parentElement as HTMLElement
25
+
26
+ const wrapper = document . createElement ( 'div' )
27
+ wrapper . setAttribute ( 'id' , 'theme-switch' )
28
+ sidenav . appendChild ( wrapper )
29
+ ReactDOM . render ( React . createElement ( ThemeSwitch ) , wrapper )
31
30
}
32
31
33
32
ReactDOM . render (
You can’t perform that action at this time.
0 commit comments