Update deprecated jQuery functions for jquery.cookie.js

This commit is contained in:
roykho 2021-02-04 07:26:10 -08:00 committed by Jonathan Sadowski
parent 6b7b8d7b8e
commit ebdaaa3f08
2 changed files with 6 additions and 6 deletions

View File

@ -49,14 +49,14 @@
function read(s, converter) {
var value = config.raw ? s : parseCookieValue(s);
return $.isFunction(converter) ? converter(value) : value;
return 'function' === typeof converter ? converter(value) : value;
}
var config = $.cookie = function (key, value, options) {
// Write
if (value !== undefined && !$.isFunction(value)) {
if (value !== undefined && 'function' !== typeof value) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {

View File

@ -474,7 +474,7 @@
* The underlying implementation of `ZeroClipboard.destroy`.
* @private
*/
var _destroy = function() {
var _destroy = function() {console.log('zero', ZeroClipboard);
ZeroClipboard.clearData();
ZeroClipboard.blur();
ZeroClipboard.emit("destroy");