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}