Skip to content

Wrong context for computed getters in 0.11.0 #447

@divmain

Description

@divmain

I'm not sure what your preference is in regards to submitting issues against 0.11.0 release candidate - I hope you don't mind my filing a bug.

As illustrated here, in the context of a v-repeated VM, if a computed property is defined using computedProp: { get: fn () {}, set: fn {} } rather than computedProp: fn () {}, the context for the get method can be incorrect.

My specific case is as follows: given an array (arr) of two elements , render these elements using v-repeat="el: arr" combined with v-component="el-component" v-with="el". When el-component has a computed getter (using get/set object format), the context for this getter is incorrect for the second element in the array (this is the VM of element 1).

In looking through the stack trace, I noticed a double binding for the get method. I'm starting to look through Vue's code to familiarize myself - in the future, I hope to offer a fix in addition to a bug report :)

Thanks again for a great library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions