Skip to content

Commit

Permalink
fix: Force hydrate if no SSR rendered html found
Browse files Browse the repository at this point in the history
  • Loading branch information
znck committed Jan 18, 2019
1 parent 0a4dfa9 commit ce733bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Hydrate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ export default {
}
},
mounted() {
if (this.ssrOnly) return;
if (this.$el.childElementCount === 0) {
// No SSR rendered content.
this.hydrated = true;
return;
}
if (this.ssrOnly) return;
if (this.whenIdle) {
const id = requestIdleCallback(
() => {
Expand Down

0 comments on commit ce733bb

Please sign in to comment.