cloudinary / cloudinary_js

Cloudinary JavaScript library
MIT License
328 stars 224 forks source link

Jquery.cloudinary.js is using arrow functions that are incompatible with ES5 #259

Closed pomartel closed 3 years ago

pomartel commented 3 years ago

Describe the bug in a sentence or two.

jquery.cloudinary.js is now using arrow functions which are not compatible with ES5.

https://github.com/cloudinary/cloudinary_js/blob/11c733674f8c0768af75a0fea8c8980684398101/js/jquery.cloudinary.js#L1493

https://github.com/cloudinary/cloudinary_js/blob/11c733674f8c0768af75a0fea8c8980684398101/js/jquery.cloudinary.js#L1498

Issue Type (Can be multiple)

[x] Build - Can’t install or import the SDK

Steps to reproduce

I am using the Cloudinary ruby gem on a project with the Rails asset pipeline. This breaks the asset compilation build.

Error screenshots

Screen Shot 2020-09-24 at 3 50 28 PM

Versions and Libraries (fill in the version numbers)

It stopped working in version 1.16.0 of the Cloudinary Gem.

This is the commit that broke the ES5 compatibility: https://github.com/cloudinary/cloudinary_js/commit/0fbbf755de4d6194c33896b4834a6044d7b57258#diff-5b01ca7b593665b8e202784a1b462bd7

Maybe a minified version of jquery.cloudinary.js could be included in the repository?

ghost commented 3 years ago

Hi @pomartel, Thanks for reporting this and sorry about this. It should now be fixed, please let us know if it works for you.

pomartel commented 3 years ago

Thank you for the fast response!