diff options
author | 2023-10-08 03:22:47 +0800 | |
---|---|---|
committer | 2023-10-07 21:22:47 +0200 | |
commit | eaed844ea8f2f52e0c9caa40bb3ec7377e10595f (patch) | |
tree | e3a0b1efd09c554f1d10012602655bcc3f6a8e49 | |
parent | 30de324361bc261956eb9fc08fe60a82ff602a9b (diff) | |
download | astro-eaed844ea8f2f52e0c9caa40bb3ec7377e10595f.tar.gz astro-eaed844ea8f2f52e0c9caa40bb3ec7377e10595f.tar.zst astro-eaed844ea8f2f52e0c9caa40bb3ec7377e10595f.zip |
fix(assets): add the missing `await` to getHTMLAttributes (#8773)
-rw-r--r-- | .changeset/young-taxis-battle.md | 5 | ||||
-rw-r--r-- | packages/astro/src/assets/internal.ts | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/young-taxis-battle.md b/.changeset/young-taxis-battle.md new file mode 100644 index 000000000..66d0ad1d4 --- /dev/null +++ b/.changeset/young-taxis-battle.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix an issue where HTML attributes do not render if getHTMLAttributes in an image service returns a Promise
\ No newline at end of file diff --git a/packages/astro/src/assets/internal.ts b/packages/astro/src/assets/internal.ts index 9cb48f588..310b746a8 100644 --- a/packages/astro/src/assets/internal.ts +++ b/packages/astro/src/assets/internal.ts @@ -111,7 +111,7 @@ export async function getImage( src: imageURL, attributes: service.getHTMLAttributes !== undefined - ? service.getHTMLAttributes(validatedOptions, imageConfig) + ? await service.getHTMLAttributes(validatedOptions, imageConfig) : {}, }; } |