Skip to content

v4.3.4

Compare
Choose a tag to compare
@m-mujica m-mujica released this 29 Aug 14:45
· 29 commits to master since this release

getOwnEnumerableKeys accounts for default behavior values

This patch release fixes an issue with getOwnEnumerableKeys ignoring the default behavior values:

var VM = CanMap.extend({
  define: {
    "*": {
      serialize: false
    },
    notEnumerable: {
      value: "no"
    },
    enumerableProp: {
      serialize: true,
      value: "yes"
    },
    notEnumerable2: {
      serialize: false,
      value: "maybe"
    }
  }
});

That meant, calling canReflect.getOwnEnumerableKeys with instances of VM will return all keys but notEnumerable2. This release fixes that, so default behavior values are used first but any local property value can override the default.