flyzto 4 gün önce
ebeveyn
işleme
9adc809ffb
1 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 4 4
      server/libs/getGamesRelations.js

+ 4 - 4
server/libs/getGamesRelations.js

@@ -29,10 +29,10 @@ export const getGamesRelationsMap = (hasOdds=false) => {
   Object.entries(gamesRelations).forEach(([id, relation]) => {
     const { platforms } = relation;
     const { polymarket, pinnacle, huanguan, obsports } = platforms;
-    const { id: pmId = 0 } = polymarket;
-    const { id: pcId = 0 } = pinnacle;
-    const { id: hgId = 0 } = huanguan;
-    const { id: obId = 0 } = obsports;
+    const { id: pmId = 0 } = polymarket ?? {};
+    const { id: pcId = 0 } = pinnacle ?? {};
+    const { id: hgId = 0 } = huanguan ?? {};
+    const { id: obId = 0 } = obsports ?? {};
     const pmGame = getGameData(pmOddsMap.get(pmId), hasOdds) ?? {};
     const pcGame = getGameData(pcOddsMap.get(pcId), hasOdds) ?? {};
     const hgGame = getGameData(hgOddsMap.get(hgId), hasOdds) ?? {};