JuniorTour / vue-template-babel-compiler

Enable Optional Chaining(?.), Nullish Coalescing(??) and many new ES syntax for Vue.js SFC based on Babel
https://www.npmjs.com/package/vue-template-babel-compiler
118 stars 9 forks source link

[Bug] Doesn't work properly with v-for #4

Closed maxkopych closed 2 years ago

maxkopych commented 2 years ago

Current behavior

<div class="card mb-0" v-for="(n,i) in amount " v-if="!reload">
   <div class="card-header d-flex align-items-center" @click="show(i)">
   </div>
</div>

amount is integer

Getting error on click:

Property or method "i" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.
maxkopych commented 2 years ago

Never mind I guess it was fixed with 1.0.1 release. Thank you for package! quite useful!