0
Fork 0
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:
Edo-San 2023-06-08 22:58:17 +02:00 committed by GitHub
parent e6bff651ff
commit 52f0480d14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fixed a bug that threw an Exception when spreading potentially undefined values as HTML attributes

View file

@ -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 } = {}
) {