File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export const initPlayer = async () => {
9494
9595 player . addEventListener ( 'ended' , ( ) => sendMessage ( Message . QUEUE_NEXT , null , false ) ) ;
9696 const handlers = getPlayerController ( ) ;
97- handlers . store . subscribe ( e => e . qualityLevels , setPlayerQuality ) ;
97+ handlers ? .store . subscribe ( e => e . qualityLevels , setPlayerQuality ) ;
9898 setPlayerQuality ( ) ;
9999
100100 const { autoplay, autoplayQueue } = options ;
@@ -464,7 +464,7 @@ const getPlayerController = () => {
464464 for ( const key of Object . keys ( root ) ) {
465465 if ( key . startsWith ( '__reactProps' ) ) {
466466 for ( const child of ( root [ key ] as any ) . children ) {
467- if ( child . props && child . props . playerHandlers )
467+ if ( child && child . props && child . props . playerHandlers )
468468 return child . props . playerHandlers as PlayerHandlers ;
469469 }
470470 break ;
You can’t perform that action at this time.
0 commit comments