Removed unnecessary <template> element
Vue.js uses `<template>` when we don't want to output an element but still want to set some attributes (like `v-if`) on a piece of text. Since we're outputting a `<span>`, we can just move the attributes there.
This commit is contained in:
@@ -3,7 +3,7 @@ const TEMPLATE = `
|
|||||||
<ul>
|
<ul>
|
||||||
<li v-for="crumb in breadcrumbs">
|
<li v-for="crumb in breadcrumbs">
|
||||||
<a :href="crumb.url" v-if="!crumb._self" @click.prevent="navigateToNode(crumb._id)">{{ crumb.name }}</a>
|
<a :href="crumb.url" v-if="!crumb._self" @click.prevent="navigateToNode(crumb._id)">{{ crumb.name }}</a>
|
||||||
<template v-else><span>{{ crumb.name }}</span></template>
|
<span v-else>{{ crumb.name }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user