canjs / can-map-define

Define rich attribute behavior
https://canjs.com/doc/can-map-define.html
MIT License
3 stars 2 forks source link

getOwnEnumerableKeys breaks with nulls #85

Closed phillipskevin closed 6 years ago

phillipskevin commented 6 years ago

This throws:

var VM = CanMap.extend({});

var vm = new VM({ foo: null });
canReflect.getOwnEnumerableKeys(vm);

Because we're trying to do "serialize" in null in the keysForDefinition helper. We should just use Object.keys for _data.