xiaolin.fu 4 달 전
부모
커밋
498b92af8e
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      src/hooks/useGame.tsx

+ 1 - 3
src/hooks/useGame.tsx

@@ -61,10 +61,8 @@ const useGame = () => {
                     const url = `${encodeURI(res.data.game_url)}&return_url=${encodeURI(window.location.href.replace(pathname, ""))}&category_name=${game.provider}`;
 
                     // 如果是pp游戏,则当前窗口打开新的地址,不需要加return_url
-                    if(categoryName.toLowerCase() === 'pp'){
+                    if(categoryName?.toLowerCase() === 'pp'){
                       const ppUrl = `${encodeURI(res.data.game_url)}&category_name=${game.provider}`;
-                      console.log('ppUrl',ppUrl)
-                      return
                       window.open(ppUrl,'_self');
                       return
                     }