mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Fix/update spread attribute (#7310)
* fix: add default fallback for spreadAttributes values * chore: add PR changeset * chore: fix pnpm lock --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
This commit is contained in:
parent
e6bff651ff
commit
52f0480d14
2 changed files with 6 additions and 1 deletions
5
.changeset/blue-spies-live.md
Normal file
5
.changeset/blue-spies-live.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fixed a bug that threw an Exception when spreading potentially undefined values as HTML attributes
|
|
@ -69,7 +69,7 @@ export function __astro_tag_component__(Component: unknown, rendererName: string
|
|||
|
||||
// Adds support for `<Component {...value} />
|
||||
export function spreadAttributes(
|
||||
values: Record<any, any>,
|
||||
values: Record<any, any> = {},
|
||||
_name?: string,
|
||||
{ class: scopedClassName }: { class?: string } = {}
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue