Object.values undefined


When I create an electron app with a script that uses Object.values like:

console.log(Object.values({ a: 1 }))

it throws because Object.values is undefined.
When running this script with node, there is no problem.
Also in my render process Object.values is not defined. Is this normal? Why is this not defined only when using electron?


According to MDN, Object.values is hidden behind a flag in Chrome. I suspect this is the reason.


Thanks for your reply.
Indeed, it is a feature behind the “–harmony-object-values-entries” flag. This flag is enabled by default in Chrome 54. But electron is not updated to this version yet …