Comparing version 1.5.1 to 1.5.2
# Changelog | ||
## 1.5.2- 2021-12-23 | ||
- Fix bug where attributes where not copied from (html|head|body) element | ||
## 1.5.1- 2021-12-23 | ||
@@ -4,0 +8,0 @@ |
@@ -223,2 +223,6 @@ // Safari Polyfills | ||
replacement.append(...nextNode.childNodes); | ||
/* c8 ignore next 3 */ | ||
for (const key of nextNode.getAttributeNames()) { | ||
replacement.setAttribute(key, nextNode.getAttribute(key)); | ||
} | ||
nextNode.replaceWith(replacement); | ||
@@ -811,4 +815,4 @@ } | ||
function setter(val) { | ||
const keys = // @ts-ignore | ||
(this && Reflect.has(this, reactiveSymbol) ? this : chainKeysProxy)[keysSymbol.description]; | ||
const keys = ( // @ts-ignore | ||
this && Reflect.has(this, reactiveSymbol) ? this : chainKeysProxy)[keysSymbol.description]; | ||
const [resolvedValue, resolvedObj] = resolveObject(keys); | ||
@@ -815,0 +819,0 @@ const lastProp = keys[keys.length - 1]; |
{ | ||
"name": "hydro-js", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "A lightweight reactive library", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -335,8 +335,12 @@ declare global { | ||
let nextNode; | ||
while ((nextNode = root.nextNode())) { | ||
const tag = (nextNode as Element).localName.replace(Placeholder.dummy, ""); | ||
while ((nextNode = root.nextNode() as Element)) { | ||
const tag = nextNode.localName.replace(Placeholder.dummy, ""); | ||
const replacement = document.createElement(tag); | ||
replacement.append(...(nextNode as Element).childNodes); | ||
(nextNode as Element).replaceWith(replacement); | ||
replacement.append(...nextNode.childNodes); | ||
/* c8 ignore next 3 */ | ||
for (const key of nextNode.getAttributeNames()) { | ||
replacement.setAttribute(key, nextNode.getAttribute(key)!); | ||
} | ||
nextNode.replaceWith(replacement); | ||
} | ||
@@ -1052,6 +1056,5 @@ | ||
function setter<U>(val: U) { | ||
const keys = // @ts-ignore | ||
(this && Reflect.has(this, reactiveSymbol) ? this : chainKeysProxy)[ | ||
keysSymbol.description! | ||
]; | ||
const keys = ( // @ts-ignore | ||
this && Reflect.has(this, reactiveSymbol) ? this : chainKeysProxy | ||
)[keysSymbol.description!]; | ||
const [resolvedValue, resolvedObj] = resolveObject(keys); | ||
@@ -1058,0 +1061,0 @@ const lastProp = keys[keys.length - 1]; |
279684
5120