diff --git a/js/jquery.cloudinary.js b/js/jquery.cloudinary.js index 69e1bca4..b626c496 100644 --- a/js/jquery.cloudinary.js +++ b/js/jquery.cloudinary.js @@ -1490,12 +1490,16 @@ var slice = [].slice, // operators operatorsPattern = "((" + operators + ")(?=[ _]))"; operatorsReplaceRE = new RegExp(operatorsPattern, "g"); - expression = expression.replace(operatorsReplaceRE, match => Expression.OPERATORS[match]); + expression = expression.replace(operatorsReplaceRE, function (match) { + return Expression.OPERATORS[match]; + }); // predefined variables predefinedVarsPattern = "(" + Object.keys(Expression.PREDEFINED_VARS).join("|") + ")"; predefinedVarsReplaceRE = new RegExp(predefinedVarsPattern, "g"); - expression = expression.replace(predefinedVarsReplaceRE, (match, p1, offset) => (expression[offset - 1] === '$' ? match : Expression.PREDEFINED_VARS[match])); + expression = expression.replace(predefinedVarsReplaceRE, function(match, p1, offset){ + return (expression[offset - 1] === '$' ? match : Expression.PREDEFINED_VARS[match]); + }); return expression.replace(/[ _]+/g, '_'); }; diff --git a/test/spec/env/js-folder-spec.js b/test/spec/env/js-folder-spec.js index 0a88b71b..895e3ec7 100644 --- a/test/spec/env/js-folder-spec.js +++ b/test/spec/env/js-folder-spec.js @@ -16,7 +16,7 @@ jasmine.getEnv().addReporter(new SpecReporter({ // List of files to test const files = [ {name: 'canvas-to-blob.min.js', checkSum: "33ecbe6885ad339c3a5af0cfa063810d"}, - {name: 'jquery.cloudinary.js', checkSum: "6510379e5fa1fb3e8b17db441b922b9b"}, + {name: 'jquery.cloudinary.js', checkSum: "27886431ad43cf97ca3edd2ed3f4e379"}, {name: 'jquery.fileupload.js', checkSum: "4bfd85460689a29e314ddfad50c184e0"}, {name: 'jquery.fileupload-image.js', checkSum: "7c40367b00f74b0c7c43bff009dde942"}, {name: 'jquery.fileupload-process.js', checkSum: "840f65232eaf1619ea0aff1ab4f5e444"},