Skip to content

Commit 9144c76

Browse files
committed
Fix vdom not matching SSR content
Fixes #15
1 parent e26db68 commit 9144c76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/LazyHydrate.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,13 @@ export default {
136136
},
137137
},
138138
render(h) {
139+
const tag = this.$el ? this.$el.tagName : `div`;
139140
const children = this.$scopedSlots.default
140141
? this.$scopedSlots.default({ hydrated: this.hydrated })
141142
: this.$slots.default[0];
142143
const vnode = this.hydrated
143144
? children
144-
: h(`div`);
145+
: h(tag);
145146

146147
// Special thanks to Rahul Kadyan for the following lines of code.
147148
// https://github.com/znck

0 commit comments

Comments
 (0)