From edbcf5e5ab8ea8dfce0ba16a217fbe5f86174db7 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Thu, 27 Mar 2025 12:59:01 +0100 Subject: [PATCH] Lib: Update SubstitutionCard promises --- src/lib/components/cards/SubstitutionCard.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/cards/SubstitutionCard.svelte b/src/lib/components/cards/SubstitutionCard.svelte index 2d01372..6adec6f 100644 --- a/src/lib/components/cards/SubstitutionCard.svelte +++ b/src/lib/components/cards/SubstitutionCard.svelte @@ -113,10 +113,10 @@ }; -{#await Promise.all([data.graphics, data.drivers]) then [graphics, drivers]} +{#await data.drivers then drivers} (drivers, "id", substitution?.substitute ?? "")?.headshot_url ?? - get_driver_headshot_template(graphics)} + imgsrc={get_by_value(drivers, "id", substitution?.substitute ?? "")?.headshot_url ?? + get_driver_headshot_template(data.graphics)} imgid="headshot_preview" width="w-full sm:w-auto" imgwidth={DRIVER_HEADSHOT_WIDTH}