Adds computed attributes for can.List instances #862

Merged
merged 3 commits into from Apr 9, 2014

Conversation

Projects
None yet
2 participants
@alexisabril
Contributor

alexisabril commented Apr 2, 2014

Adds computed attributes for can.List instances. Closes #790

@daffl daffl changed the title from Adds computed attributes for can.List instances. Fixes #790 to Adds computed attributes for can.List instances Apr 4, 2014

@daffl daffl added this to the 2.1.0 milestone Apr 4, 2014

list/list.js
@@ -127,7 +128,15 @@ steal("can/util", "can/map", "can/map/bubble.js",function (can, Map, bubble) {
},
__get: function (attr) {
- return attr ? this[attr] : this;
+ if (attr) {
+ if (this._computedBindings[attr]) {

This comment has been minimized.

@daffl

daffl Apr 7, 2014

Contributor

Should we use the same check here as in can.Map (if (this[attr] && this[attr].isComputed && can.isFunction(this.constructor.prototype[attr])) {)?

@daffl

daffl Apr 7, 2014

Contributor

Should we use the same check here as in can.Map (if (this[attr] && this[attr].isComputed && can.isFunction(this.constructor.prototype[attr])) {)?

daffl added a commit that referenced this pull request Apr 9, 2014

Merge pull request #862 from bitovi/790-list-compute
Adds computed attributes for can.List instances

@daffl daffl merged commit b4b44f6 into lazy-bubbling Apr 9, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@daffl daffl deleted the 790-list-compute branch Apr 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment