FIX: Add missing Object.entries polyfill for IE11

This was omitted when IE polyfills were migrated from polyfills.js to ie.js
This commit is contained in:
David Taylor 2019-12-18 11:36:26 +00:00
parent 1921538faa
commit b4f28ce2b1

View File

@ -1,6 +1,19 @@
/* eslint-disable */
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
if (!Object.entries) {
Object.entries = function(obj) {
var ownProps = Object.keys(obj),
i = ownProps.length,
resArray = new Array(i); // preallocate the Array
while (i--) resArray[i] = [ownProps[i], obj[ownProps[i]]];
return resArray;
};
}
// adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
// missing in ie only
if (!Object.values) {
Object.values = function(obj) {
var ownProps = Object.keys(obj),