Im using vue/vuetify, and i'm trying to get it to work in IE11. When I run it, I get this error
TypeError: Object doesn't support property or method 'values'
but then when I add a pollyfill
if (!Object.values) {
Object.prototype.values = function (obj) {
return Object.keys(obj).map(function (e) {
return obj[e];
});
};
}
I get this from jquery 3.4.0
Object.keys: argument is not an Object
because it ends up calling the above function, but not passing any params to it. From here
add = function( key, valueOrFunction ) {
// If value is a function, invoke it and use its return value
var value = isFunction( valueOrFunction ) ?
valueOrFunction() :
valueOrFunction;
s[ s.length ] = encodeURIComponent( key ) + "=" +
encodeURIComponent( value == null ? "" : value );
};
it calls
valueOrFunction() // which is the Object.values()
Here is a jsfiddle
https://jsfiddle.net/cn75e4xs/3/
Open in IE11, and see console tab. I get
Object.keys: argument is not an Object
because the function gets called without passing a parameter, so obj
becomes undefined in the pollyfill.