Closed si13b closed 9 years ago
That's because it uses Object.keys
now, which internally uses ToObject(o)
(for newer browsers at least), which throws for null
and undefined
.
For MooTools, the behavior of other types of values is not documented, so we don't guarantee the result of Object.values(null)
.
Looking at the ES2016 proposal for Object.values, it will use ToObject(o)
as well, thus throws, so is more or less consisted with MooTools 1.5.2 Object.values
That makes sense and it's probably the preferred behaviour, especially if it's consistent with the (potentially) native implementation. I'm not sure if it's worth flagging this somewhere in the docs or not so users know there's a potentially breaking change when upgrading from 1.5.1?
Feel free to close this one.
Object values in 1.5.1:
Object values in 1.5.3 dev: