File tree Expand file tree Collapse file tree
features/rooms/livekit/prefabs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,12 +20,19 @@ export const AppInitialization = () => {
2020 useSupport ( support )
2121
2222 useEffect ( ( ) => {
23- if ( custom_css_url ) {
24- const link = document . createElement ( 'link' )
25- link . href = custom_css_url
26- link . id = 'meet-custom-css'
27- link . rel = 'stylesheet'
28- document . head . appendChild ( link )
23+ if ( ! custom_css_url ) return
24+
25+ const link = document . createElement ( 'link' )
26+ link . href = custom_css_url
27+ link . id = 'meet-custom-css'
28+ link . rel = 'stylesheet'
29+ document . head . appendChild ( link )
30+
31+ return ( ) => {
32+ const existingLink = document . getElementById ( 'meet-custom-css' )
33+ if ( existingLink ) {
34+ existingLink . remove ( )
35+ }
2936 }
3037 } , [ custom_css_url ] )
3138
Original file line number Diff line number Diff line change 33 isEqualTrackRef ,
44 isTrackReference ,
55 isWeb ,
6- log ,
76} from '@livekit/components-core'
87import { RoomEvent , Track } from 'livekit-client'
98import * as React from 'react'
You can’t perform that action at this time.
0 commit comments