I get a syntax error when using this line of code in IE11.
let themes = _.filter(data, (el) => {
if (OrganizationId == 21) {
return el.Code == 'skin-3';
} else {
return el.Code != 'skin-3';
}
});
I get a syntax error when using this line of code in IE11.
let themes = _.filter(data, (el) => {
if (OrganizationId == 21) {
return el.Code == 'skin-3';
} else {
return el.Code != 'skin-3';
}
});
You're using arrow function which is not supported by IE and let
statement which is partial supported by IE.
I suggest that you transpile the code to ES5 syntax using Babel. You can convert the code to below to make it work in IE 11:
var themes = _.filter(data, function (el) {
if (OrganizationId == 21) {
return el.Code == 'skin-3';
} else {
return el.Code != 'skin-3';
}
});