mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
Remove extraneous div
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.
This commit is contained in:
parent
13284fbf8a
commit
f1386c3a5e
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user