Skip to content

Commit

Permalink
hot-fix for #974 (#975)
Browse files Browse the repository at this point in the history
  • Loading branch information
migbash authored Jan 12, 2023
1 parent 0594671 commit c97f976
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
loaded = true;
const responses_invalid =
response == undefined
FIXTURE_H2H == undefined
|| response == undefined
|| response.historic_fixtures[0] == undefined
|| response.historic_fixtures[0]?.probabilities == undefined
|| response_main_sportbook == undefined
Expand Down Expand Up @@ -474,20 +475,23 @@
<div
id="seo-widget-box">
<!--
[ℹ] widget-title -->
<!-- <h2>{FIXTURE_VOTES_TRANSLATION?.widget_title}</h2> -->
<!--
[ℹ] team-names
[ℹ] widget-title
-->
{#each FIXTURE_H2H?.teams_data as item}
<p>{item?.team_name}</p>
{/each}
<!--
[ℹ] league-names [from-fixtures]
-->
{#each FIXTURE_H2H?.data?.last_5_data as item}
<p>{item?.league?.data?.name}</p>
{/each}
<!-- <h2>{FIXTURE_VOTES_TRANSLATION?.widget_title}</h2> -->
{#if FIXTURE_H2H != undefined}
<!--
[ℹ] team-names
-->
{#each FIXTURE_H2H?.teams_data as item}
<p>{item?.team_name}</p>
{/each}
<!--
[ℹ] league-names [from-fixtures]
-->
{#each FIXTURE_H2H?.data?.last_5_data as item}
<p>{item?.league?.data?.name}</p>
{/each}
{/if}
</div>
<!-- {/if} -->

Expand Down
25 changes: 24 additions & 1 deletion src/routes/[lang=lang]/[sport]/[fixture=fixture]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,29 @@ export async function load({
* ==========
*/

// [🐞]
if (dev) {
console.log('fixture_id: ', fixture_id)
if (response_fixtures_seo == undefined) console.log("response_fixtures_seo is undefined")
if (response_fixtures_page_info == undefined) console.log("response_fixtures_page_info is undefined")
if (response_scoreboard == undefined) console.log("response_scoreboard is undefined")
if (response_scoreboard_translation == undefined) console.log("response_scoreboard_translation is undefined")
if (response_lineups == undefined) console.log("response_lineups is undefined")
if (response_lineups_translation == undefined) console.log("response_lineups_translation is undefined")
if (response_incidents == undefined) console.log("response_incidents is undefined")
if (response_incidents_translation == undefined) console.log("response_incidents_translation is undefined")
if (response_featured_betting_sites_translation == undefined) console.log("response_featured_betting_sites_translation is undefined")
if (response_statistics == undefined) console.log("response_statistics is undefined")
if (response_statistics_translation == undefined) console.log("response_statistics_translation is undefined")
if (response_content == undefined) console.log("response_content is undefined")
if (response_content_translation == undefined) console.log("response_content_translation is undefined")
if (response_about_translation == undefined) console.log("response_about_translation is undefined")
if (response_votes_translation == undefined) console.log("response_votes_translation is undefined")
if (response_h2h == undefined) console.log("response_h2h is undefined")
if (response_h2h_translation == undefined) console.log("response_h2h_translation is undefined")
if (response_fixtures_odds_translations == undefined) console.log("response_fixtures_odds_translations is undefined")
}

if (
response_fixtures_seo
&& response_fixtures_page_info
Expand All @@ -392,7 +415,7 @@ export async function load({
&& response_about_translation
&& response_votes_translation
&& response_probability_translation
&& response_h2h
// && response_h2h // IMPORTANT can be "NULL"
&& response_h2h_translation
// extra
&& response_fixtures_odds_translations
Expand Down
25 changes: 24 additions & 1 deletion src/routes/[sport]/[fixture=fixture]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,29 @@ export async function load({
* ==========
*/

// [🐞]
if (dev) {
console.log('fixture_id: ', fixture_id)
if (response_fixtures_seo == undefined) console.log("response_fixtures_seo is undefined")
if (response_fixtures_page_info == undefined) console.log("response_fixtures_page_info is undefined")
if (response_scoreboard == undefined) console.log("response_scoreboard is undefined")
if (response_scoreboard_translation == undefined) console.log("response_scoreboard_translation is undefined")
if (response_lineups == undefined) console.log("response_lineups is undefined")
if (response_lineups_translation == undefined) console.log("response_lineups_translation is undefined")
if (response_incidents == undefined) console.log("response_incidents is undefined")
if (response_incidents_translation == undefined) console.log("response_incidents_translation is undefined")
if (response_featured_betting_sites_translation == undefined) console.log("response_featured_betting_sites_translation is undefined")
if (response_statistics == undefined) console.log("response_statistics is undefined")
if (response_statistics_translation == undefined) console.log("response_statistics_translation is undefined")
if (response_content == undefined) console.log("response_content is undefined")
if (response_content_translation == undefined) console.log("response_content_translation is undefined")
if (response_about_translation == undefined) console.log("response_about_translation is undefined")
if (response_votes_translation == undefined) console.log("response_votes_translation is undefined")
if (response_h2h == undefined) console.log("response_h2h is undefined")
if (response_h2h_translation == undefined) console.log("response_h2h_translation is undefined")
if (response_fixtures_odds_translations == undefined) console.log("response_fixtures_odds_translations is undefined")
}

if (
response_fixtures_seo
&& response_fixtures_page_info
Expand All @@ -392,7 +415,7 @@ export async function load({
&& response_about_translation
&& response_votes_translation
&& response_probability_translation
&& response_h2h
// && response_h2h // IMPORTANT can be "NULL"
&& response_h2h_translation
// extra
&& response_fixtures_odds_translations
Expand Down

0 comments on commit c97f976

Please sign in to comment.