Skip to content

Commit

Permalink
Remove extraneous div
Browse files Browse the repository at this point in the history
Vue 2.x allows multiple root elements when only one would be rendered. Using `v-if` with `v-else` ensures that only one component will get rendered.
  • Loading branch information
sirlancelot committed Feb 9, 2017
1 parent 13284fb commit f1386c3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/app/components/nuxt.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<template>
<div>
<nuxt-child v-if="!nuxt.err"></nuxt-child>
<nuxt-error v-if="nuxt.err" :error="nuxt.err"></nuxt-error>
</div>
<nuxt-child v-if="!nuxt.err"></nuxt-child>
<nuxt-error v-else :error="nuxt.err"></nuxt-error>
</template>

<script>
Expand Down

0 comments on commit f1386c3

Please sign in to comment.