Skip to content

Commit 573f633

Browse files
author
kj
committed
Updates tests
1 parent 1379d86 commit 573f633

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@enhance/custom-element-mixin",
3-
"version": "1.2.3-next.0",
3+
"version": "1.2.2",
44
"description": "Custom Element mixin that enables the reuse of single file components",
55
"main": "index.mjs",
66
"scripts": {
@@ -29,5 +29,8 @@
2929
"morphdom": "^2.7.2",
3030
"npm-run-all": "^4.1.5",
3131
"playwright": "^1.44.0"
32+
},
33+
"dependencies": {
34+
"@enhance/morphdom-mixin": "^1.1.3-next.0"
3235
}
3336
}

test/diff-test.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@
5252
? this.shadowRoot
5353
: this
5454

55-
const slotEl = document.createElement('div')
56-
const slottedElements = root.querySelectorAll('[slot=""]')
57-
for (const value of slottedElements.values()) {
58-
slotEl.appendChild(value)
55+
if (!this.shadowRoot) {
56+
const slotEl = document.createElement('div')
57+
const slottedElements = root.querySelectorAll('[slot=""]')
58+
for (const value of slottedElements.values()) {
59+
slotEl.appendChild(value)
60+
}
61+
updated.innerHTML = this.expandSlots(slotEl.innerHTML, updated.innerHTML)
5962
}
60-
updated.innerHTML = this.expandSlots(slotEl.innerHTML, updated.innerHTML)
6163

6264
morphdom(
6365
root,

0 commit comments

Comments
 (0)