aboutsummaryrefslogtreecommitdiff
path: root/node_modules/vuepress/lib/app/components/ClientOnly.js
blob: c786d1af8ffbd112b9692031d58b8089481bb061 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
export default {
  functional: true,
  render (h, { parent, children }) {
    if (parent._isMounted) {
      return children
    } else {
      parent.$once('hook:mounted', () => {
        parent.$forceUpdate()
      })
    }
  }
}