Уборка Unreachable statement. Замена === на == и !== на != в яваскриптах из-за ошибок с нестрогой типизацией при переходе на 7.4.

This commit is contained in:
2023-04-08 18:14:19 +03:00
parent 3f3ffc2114
commit cfaf82f73a
76 changed files with 2079 additions and 1918 deletions
+7 -7
View File
@@ -6,10 +6,10 @@
* Released under the MIT license
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
if (typeof define == 'function' && define.amd) {
// AMD
define(['jquery'], factory);
} else if (typeof exports === 'object') {
} else if (typeof exports == 'object') {
// CommonJS
factory(require('jquery'));
} else {
@@ -33,7 +33,7 @@
}
function parseCookieValue(s) {
if (s.indexOf('"') === 0) {
if (s.indexOf('"') == 0) {
// This is a quoted cookie as according to RFC2068, unescape...
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
}
@@ -59,7 +59,7 @@
if (arguments.length > 1 && !$.isFunction(value)) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {
if (typeof options.expires == 'number') {
var days = options.expires, t = options.expires = new Date();
t.setTime(+t + days * 864e+5);
}
@@ -87,14 +87,14 @@
var name = decode(parts.shift());
var cookie = parts.join('=');
if (key && key === name) {
if (key && key == name) {
// If second argument (value) is a function it's a converter...
result = read(cookie, value);
break;
}
// Prevent storing a cookie that we couldn't decode.
if (!key && (cookie = read(cookie)) !== undefined) {
if (!key && (cookie = read(cookie)) != undefined) {
result[name] = cookie;
}
}
@@ -105,7 +105,7 @@
config.defaults = {};
$.removeCookie = function (key, options) {
if ($.cookie(key) === undefined) {
if ($.cookie(key) == undefined) {
return false;
}