diff --git a/bundlewatch.config.js b/bundlewatch.config.js index ebbf2cb..8683ac6 100644 --- a/bundlewatch.config.js +++ b/bundlewatch.config.js @@ -10,11 +10,11 @@ const bundlewatchConfig = { }, { path: './dist/cloudinary-jquery.min.js', - maxSize: '23kb' + maxSize: '24kb' }, { path: './dist/cloudinary-jquery-file-upload.min.js', - maxSize: '24kb' + maxSize: '25kb' } ], defaultCompression: 'gzip', diff --git a/js/jquery.cloudinary.js b/js/jquery.cloudinary.js index 7b41a0f..b61c442 100644 --- a/js/jquery.cloudinary.js +++ b/js/jquery.cloudinary.js @@ -422,7 +422,7 @@ var slice = [].slice, * @returns {boolean} true if item is empty */ isEmpty = function(item) { - return (item == null) || (jQuery.isArray(item) || Util.isString(item)) && item.length === 0 || (jQuery.isPlainObject(item) && jQuery.isEmptyObject(item)); + return (item == null) || (Array.isArray(item) || Util.isString(item)) && item.length === 0 || (jQuery.isPlainObject(item) && jQuery.isEmptyObject(item)); }; /** @@ -565,7 +565,7 @@ var slice = [].slice, setData: setData, width: width, isString: isString, - isArray: jQuery.isArray, + isArray: Array.isArray, isEmpty: isEmpty, /** @@ -4728,7 +4728,7 @@ var slice = [].slice, return k + '=' + v; }).join('|'); } else if (Util.isArray(value)) { - if (value.length > 0 && jQuery.isArray(value[0])) { + if (value.length > 0 && Array.isArray(value[0])) { upload_params[key] = jQuery.map(value, function(array_value) { return array_value.join(','); }).join('|'); diff --git a/src/jquery-file-upload.js b/src/jquery-file-upload.js index ddbb487..e9b80fd 100644 --- a/src/jquery-file-upload.js +++ b/src/jquery-file-upload.js @@ -185,7 +185,7 @@ jQuery.fn.unsigned_cloudinary_upload = function(upload_preset, upload_params = { return k + '=' + v; }).join('|'); } else if (Util.isArray(value)) { - if (value.length > 0 && jQuery.isArray(value[0])) { + if (value.length > 0 && Array.isArray(value[0])) { upload_params[key] = jQuery.map(value, function(array_value) { return array_value.join(','); }).join('|'); diff --git a/src/util/jquery.js b/src/util/jquery.js index 773e85a..da76668 100644 --- a/src/util/jquery.js +++ b/src/util/jquery.js @@ -238,7 +238,7 @@ export var identity = function(value) { /** * @class Util */ -export var isArray = jQuery.isArray; +export var isArray = Array.isArray; export var assign = jQuery.extend; diff --git a/test/spec/env/js-folder-spec.js b/test/spec/env/js-folder-spec.js index b3153ea..324d1da 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: "7c7becb6f9ecf2defa663e70a6b3a0f5"}, - {name: 'jquery.cloudinary.js', checkSum: "22e7276c8dec1760246a230fd9fa26c3"}, + {name: 'jquery.cloudinary.js', checkSum: "171ee44fcb5e68e16362c71775a88afc"}, {name: 'jquery.fileupload.js', checkSum: "4bfd85460689a29e314ddfad50c184e0"}, {name: 'jquery.fileupload-image.js', checkSum: "7c40367b00f74b0c7c43bff009dde942"}, {name: 'jquery.fileupload-process.js', checkSum: "840f65232eaf1619ea0aff1ab4f5e444"},