diff --git a/layout/_plugins/aplayer/script.ejs b/layout/_plugins/aplayer/script.ejs index cc640de06..069f2a180 100644 --- a/layout/_plugins/aplayer/script.ejs +++ b/layout/_plugins/aplayer/script.ejs @@ -26,7 +26,7 @@ const aplayerItem = item.aplayer; if(!aplayerItem) return; const rightAplayerCheck = '<%= theme.rightmenu.layout.includes("music") %>' === 'true' && item.meta.id === '<%= theme.plugins.aplayer.id %>'; - if(rightAplayerCheck) RightMenuAplayer.checkAPlayer(); + if(rightAplayerCheck && typeof RightMenuAplayer !="undefined") RightMenuAplayer.checkAPlayer(); if(aplayerItem.events.events.play.every(item => {return item.name !== 'messagePlay'})) { aplayerItem.on('play', function messagePlay() { let index = aplayerItem.list.index;