diff --git a/.changeset/blue-spies-live.md b/.changeset/blue-spies-live.md
new file mode 100644
index 000000000000..9fef9819cce4
--- /dev/null
+++ b/.changeset/blue-spies-live.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fixed a bug that threw an Exception when spreading potentially undefined values as HTML attributes
diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts
index b7542d39bbaa..564ebbe91814 100644
--- a/packages/astro/src/runtime/server/index.ts
+++ b/packages/astro/src/runtime/server/index.ts
@@ -69,7 +69,7 @@ export function __astro_tag_component__(Component: unknown, rendererName: string
// Adds support for `
export function spreadAttributes(
- values: Record,
+ values: Record = {},
_name?: string,
{ class: scopedClassName }: { class?: string } = {}
) {