In my Angular 6 app, I'm getting a console error in IE 11 as "Script1010: "Expected Identifier". No issues with evergreen browsers.
The error occurs at the first "." in the spread operator function, identified in the bundled js file is:
function(e,t,n){"use strict";function 1(...e){if(e.length>1)
{e[0]=e[0].slice(0,-1);const t=e.length-1;for(let n=1;n<t;++n)e[n]=e[n].slice(1,-1);return e[t]=e[t].slice(1),e.join("")}
Searching on keywords around this line of code, I've identified that it comes from the ajv.min.js file, specifically, perhaps within this code section from the file:
44: [function(e, r, t) {
var a;
a = this,
function(e) {
"use strict";
function C() {
for (var e = arguments.length, r = Array(e), t = 0; t < e; t++) r[t] = arguments[t];
if (1 < r.length) {
r[0] = r[0].slice(0, -1);
for (var a = r.length - 1, s = 1; s < a; ++s) r[s] = r[s].slice(1, -1);
return r[a] = r[a].slice(1), r.join("")
}
return r[0]
}
Apparently, the spread operator is not being transpiled into something IE11 can digest and the browser chokes on the first period in the (...e) function argument with an "Expected Identifier" error.
Any suggestions for workarounds or specific polyfills to fix the issue?