willtheorangeguy / willtheorangeguy.github.io

Found redundant literal in a logical expression JS-W1043
Anti-pattern
Minor
5 months ago6 months old
Logical expression with a literal operand will always evaluate to the same value
 8      n,
 9      e = document.body;
10    function s() {
11      return parseInt(localStorage.getItem("wcTheme") || 2);12    }
13    function o() {
14      return Boolean(window.wc.darkLightEnabled);
Logical expression with a literal operand will always evaluate to the same value
3470          (this.element.getAttribute("title") || t !== "string") &&
3471            (this.element.setAttribute(
3472              "data-original-title",
3473              this.element.getAttribute("title") || "",3474            ),
3475            this.element.setAttribute("title", ""));
3476        }),
Logical expression with a literal operand will always evaluate to the same value
2946          });
2947          var n = i.default(document.body).data("padding-right");
2948          i.default(document.body).removeData("padding-right"),
2949            (document.body.style.paddingRight = n || "");2950        }),
2951        (e._getScrollbarWidth = function () {
2952          var t = document.createElement("div");
Logical expression with a literal operand will always evaluate to the same value
2936          i.default(t).each(function (t, e) {
2937            var n = i.default(e).data("padding-right");
2938            i.default(e).removeData("padding-right"),
2939              (e.style.paddingRight = n || "");2940          });
2941          var e = [].slice.call(document.querySelectorAll(".sticky-top"));
2942          i.default(e).each(function (t, e) {
Logical expression with a literal operand will always evaluate to the same value
1931              ),
1932              i = t.placement.split("-")[0],
1933              o = at(i),
1934              r = t.placement.split("-")[1] || "",1935              a = [];
1936            switch (e.behavior) {
1937              case St: