So, yet again, I am running into IE problems!
IE10 on Win7, packages and package.json can be found here, all working properly on proper browsers!
I can launch the app on IE, all is fine, but if I want to insert something into a Mongo collection directly on the client (–> minimongo) with a callback function (UPDATE: Does not matter if write it in arrow syntax or ES5 style), the code breaks on IE:
'Uint8ClampedArray' is undefined in modules.js
If the debugger is correct, it is in this codeblock:
function isObjectWeShouldTraverse(val) {
if (val !== Object(val)) return false;
// There are some object types that we know we shouldn't traverse because
// they will often result in overflows and it makes no sense to validate them.
if (val instanceof Date) return false;
if (val instanceof Int8Array) return false;
if (val instanceof Uint8Array) return false;
if (val instanceof Uint8ClampedArray) return false;
if (val instanceof Int16Array) return false;
if (val instanceof Uint16Array) return false;
if (val instanceof Int32Array) return false;
if (val instanceof Uint32Array) return false;
if (val instanceof Float32Array) return false;
if (val instanceof Float64Array) return false;
return true;
}
When I check Uint8ClampedArray in the IE JS console, it is indeed undefined, but curiously, also just entering Uint8Array
in the console returns an error:
Array.prototype.toString: 'this' is null or undefined
It seems to me that this actually breaks the code at some point. according to IE debugger, this error originates from here (last line, return fn.apply(that, arguments);
):
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// //
// node_modules/core-js/modules/_ctx.js //
// //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// optional / simple context binding // 1
var aFunction = require('./_a-function'); // 2
module.exports = function(fn, that, length){ // 3
aFunction(fn); // 4
if(that === undefined)return fn; // 5
switch(length){ // 6
case 1: return function(a){ // 7
return fn.call(that, a); // 8
}; // 9
case 2: return function(a, b){ // 10
return fn.call(that, a, b); // 11
}; // 12
case 3: return function(a, b, c){ // 13
return fn.call(that, a, b, c); // 14
}; // 15
} // 16
return function(/* ...args */){ // 17
return fn.apply(that, arguments); // 18
}; // 19
}; // 20
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Can somebody help? I desperately need my app to work on IE10 and 11 (9 would be great) … any ideas on this?
best, Patrick