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] When value set to null it gives "not defined" error on change #5

Closed maxkopych closed 2 years ago

maxkopych commented 2 years ago

Current behavior

<template>
    <div>
        {{some_value}}
        <label>
            <input type="checkbox" value="1" v-model="some_value">
            test
        </label>
    </div>
</template>

<script>
    export default {
        data() {
            return{
                some_value: null,
            }
        }
    }
</script>

it gives error:

Error in v-on handler: "ReferenceError: some_value is not defined"

but it works fine if

 some_value: '',
JuniorTour commented 2 years ago

@maxkopych It is a bug, I just published v1.0.2 will fix currrent issue:

1KM3(G_LN729ZWOVD A5VM3

You can try it by:

npm install vue-template-babel-compiler@1.0.2 -D
// or yarn
yarn add vue-template-babel-compiler@1.0.2 -D

Thank for your feedback!