diff --git a/src/index.ts b/src/index.ts index ce5c6ed..0f9d45c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -131,7 +131,7 @@ export class Cona extends HTMLElement { if (c?.attributes) { while (c.attributes.length > 0) c.removeAttribute(c.attributes[0].name); - for (const { name, value } of this._nodeMap(n?.attributes)) { + for (const { name, value } of this._nodeMap(n?.attributes || [])) { c.setAttribute(name, value); } }