Skip to content

Releases: canjs/can-define

Length Event Fixes

22 May 18:04
Compare
Choose a tag to compare

v1.0.23

01 May 23:55
Compare
Choose a tag to compare

Maintain setter performance and fixes from 1.0.20

29 Apr 23:09
Compare
Choose a tag to compare

This change fixes #182 in a different way to avoid calling the getter code (which also might setup default functionality) when a property is set during initialization. This should maintain the performance of releases prior to 1.0.20.

Pull request: #186

Fix a bug with value definitions and initialization.

28 Apr 19:13
Compare
Choose a tag to compare

v1.0.18 fixed an issue where setting values on DefineMap initialization could cause unnecessary observations. The fix inadvertently introduced a bug where properties with value definitions were not ready to be set with new values at setup time. If you see errors like "Cannot set property prop of # which has only a getter" when creating DefineMaps in v1.0.18 or v1.0.19, upgrading to v1.0.20 will fix that.

More info:
#163
#182
#184

[Deprecated] use v1.0.20 or later

28 Apr 14:44
Compare
Choose a tag to compare

[Deprecated] use v1.0.20 or later

27 Apr 18:21
Compare
Choose a tag to compare

Fix DefineList length setter (#178)

Using can-util/js/log/log instead of console.log

10 Mar 23:38
Compare
Choose a tag to compare

setter with default value bug fix

01 Feb 23:54
Compare
Choose a tag to compare
  • #144 - fixed issue with setter and a default value causing an infinte loop
  • #143 - fixed a link in the wildcard docs

.sort does not clone items

10 Jan 23:01
Compare
Choose a tag to compare

From #138, this fixes a bug where .sort() would create copies of every item in the list instead of just moving those items around.

`value` and async `set` work together

05 Jan 18:52
Compare
Choose a tag to compare

From #136, you can now use async setters like:

var Type = define.Constructor({
    prop: {
        value: 2,
        set: function(num, resolve){
            resolve( num * num );
        }
    }
});