Home

Issue: 2808

v-for variable is undefined in string interpolated v-bind, but works in mustaches

[issue link]

I have the following component:

<template lang="pug">
#blog
  template(v-for='post in posts' v-if='posts')
    nuxt-link(:to=`/blog/${post}`) {{ post }}
    p {{ post }}
</template>

<script>
import * as postsMarkdown from '../../assets/js/md-index';

export default {
  data() {
    return {
      posts: Object.keys(postsMarkdown),
    };
  },
};
</script>

Unless I comment out the nuxt-link element, it fails to build, but when commented, the p properly renders with the contents of post. Am I doing something wrong?

This question is available on Nuxt.js community (#c2439)