Magento 1.9.4.4 breaks JavaScript for IE11 Users
After upgrading to Magento 1.9.4.4 we noticed our IE11 visitors experiencing difficulting with their checkout. On investigation with an IE11 test environment a unhandled global exception came up.
Message: Unexpected token =>
File: js/varien/js.js 776 : 28
The issue is arrow functions are not supported by older browsers such as IE11. The code causing the error:
function buttonDisabler() {
const buttons = document.querySelectorAll('button.save');
buttons.forEach(button => button.disabled = true);
}
This function was added in this latest release but is only used by the System > Tools > Compilation page. If you don’t use this feature, like most people, then you can simply delete this function. However, if need be the following will work.
function buttonDisabler() {
const buttons = document.querySelectorAll('button.save');
buttons.forEach(function(button){
button.disabled = true;
});
}