From 7d4c8e6545b971776ac47e23b83df1cdaa603202 Mon Sep 17 00:00:00 2001
From: migbash <20924663+migbash@users.noreply.github.com>
Date: Thu, 12 Jan 2023 13:05:05 +0000
Subject: [PATCH] `hot-fix` for #974
---
.../head-2-head/Head_2_Head_Widget.svelte | 32 +++++++++++--------
.../[sport]/[fixture=fixture]/+page.ts | 25 ++++++++++++++-
src/routes/[sport]/[fixture=fixture]/+page.ts | 25 ++++++++++++++-
3 files changed, 66 insertions(+), 16 deletions(-)
diff --git a/src/lib/components/fixtures_page/head-2-head/Head_2_Head_Widget.svelte b/src/lib/components/fixtures_page/head-2-head/Head_2_Head_Widget.svelte
index 58e3793cd..aad2c8fe2 100644
--- a/src/lib/components/fixtures_page/head-2-head/Head_2_Head_Widget.svelte
+++ b/src/lib/components/fixtures_page/head-2-head/Head_2_Head_Widget.svelte
@@ -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
@@ -474,20 +475,23 @@
diff --git a/src/routes/[lang=lang]/[sport]/[fixture=fixture]/+page.ts b/src/routes/[lang=lang]/[sport]/[fixture=fixture]/+page.ts
index b648f15a9..3ea9e1a8a 100644
--- a/src/routes/[lang=lang]/[sport]/[fixture=fixture]/+page.ts
+++ b/src/routes/[lang=lang]/[sport]/[fixture=fixture]/+page.ts
@@ -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
@@ -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
diff --git a/src/routes/[sport]/[fixture=fixture]/+page.ts b/src/routes/[sport]/[fixture=fixture]/+page.ts
index b648f15a9..3ea9e1a8a 100644
--- a/src/routes/[sport]/[fixture=fixture]/+page.ts
+++ b/src/routes/[sport]/[fixture=fixture]/+page.ts
@@ -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
@@ -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