diff options
Diffstat (limited to 'core/misc/jquery.cookie.shim.es6.js')
-rw-r--r-- | core/misc/jquery.cookie.shim.es6.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/core/misc/jquery.cookie.shim.es6.js b/core/misc/jquery.cookie.shim.es6.js index 0e41742491d5..1751114b2d89 100644 --- a/core/misc/jquery.cookie.shim.es6.js +++ b/core/misc/jquery.cookie.shim.es6.js @@ -23,7 +23,7 @@ * @return {boolean} * True if the object is a function. */ - const isFunction = obj => + const isFunction = (obj) => Object.prototype.toString.call(obj) === '[object Function]'; /** @@ -39,10 +39,7 @@ */ const parseCookieValue = (value, parseJson) => { if (value.indexOf('"') === 0) { - value = value - .slice(1, -1) - .replace(/\\"/g, '"') - .replace(/\\\\/g, '\\'); + value = value.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); } try { @@ -148,7 +145,7 @@ } const cookieSetter = cookies.withConverter({ - write: cookieValue => encodeURIComponent(cookieValue), + write: (cookieValue) => encodeURIComponent(cookieValue), }); value = @@ -177,7 +174,7 @@ } const results = cookiesShim.get(); - Object.keys(results).forEach(resultKey => { + Object.keys(results).forEach((resultKey) => { if (results[resultKey] === undefined) { delete results[resultKey]; } |