You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
divmain
changed the title
Wrong context for computed getters
Wrong context for computed getters in 0.11.0
Sep 28, 2014
Thanks for catching this bug! The computed property setup procedure is mutating the original option object, causing it to pollute other instances. This has been fixed in fbd874f.
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-repeat
ed VM, if a computed property is defined usingcomputedProp: { get: fn () {}, set: fn {} }
rather thancomputedProp: fn () {}
, the context for theget
method can be incorrect.My specific case is as follows: given an array (
arr
) of two elements , render these elements usingv-repeat="el: arr"
combined withv-component="el-component" v-with="el"
. Whenel-component
has a computed getter (usingget
/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
bind
ing for theget
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!
The text was updated successfully, but these errors were encountered: