Skip to content

Commit

Permalink
fix(assets): add the missing await to getHTMLAttributes (#8773)
Browse files Browse the repository at this point in the history
  • Loading branch information
sumimakito committed Oct 7, 2023
1 parent 30de324 commit eaed844
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/young-taxis-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix an issue where HTML attributes do not render if getHTMLAttributes in an image service returns a Promise
2 changes: 1 addition & 1 deletion packages/astro/src/assets/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export async function getImage(
src: imageURL,
attributes:
service.getHTMLAttributes !== undefined
? service.getHTMLAttributes(validatedOptions, imageConfig)
? await service.getHTMLAttributes(validatedOptions, imageConfig)
: {},
};
}

0 comments on commit eaed844

Please sign in to comment.