willtheorangeguy / willtheorangeguy.github.io

Logical operator can be refactored to optional chain JS-W1044
Anti-pattern
Minor
5 months ago6 months old
Prefer using an optional chain expression instead, as it's more concise and easier to read
54    (t = !0),
55      (n = !1),
56      (window.wc = { darkLightEnabled: t, isSiteThemeDark: n }),
57      window.netlifyIdentity &&58        window.netlifyIdentity.on("init", (e) => {59          e ||60            window.netlifyIdentity.on("login", () => {61              document.location.href = "/admin/";62            });63        }),64      i(),
65      (window.PlotlyConfig = { MathJaxConfig: "local" });
66  })();
Prefer using an optional chain expression instead, as it's more concise and easier to read
4082            }
4083            t.setAttribute("aria-expanded", !0);
4084          }
4085          n && n();4086        }),
4087        (t._jQueryInterface = function (e) {
4088          return this.each(function () {
Prefer using an optional chain expression instead, as it's more concise and easier to read
3509            e._isWithActiveTrigger() ||
3510              (clearTimeout(e._timeout),
3511              (e._hoverState = "out"),
3512              e.config.delay && e.config.delay.hide3513                ? (e._timeout = setTimeout(function () {
3514                    e._hoverState === "out" && e.hide();
3515                  }, e.config.delay.hide))
Prefer using an optional chain expression instead, as it's more concise and easier to read
3489              ? (e._hoverState = "show")
3490              : (clearTimeout(e._timeout),
3491                (e._hoverState = "show"),
3492                e.config.delay && e.config.delay.show3493                  ? (e._timeout = setTimeout(function () {
3494                      e._hoverState === "show" && e.show();
3495                    }, e.config.delay.show))
Prefer using an optional chain expression instead, as it's more concise and easier to read
3304                e.element.removeAttribute("aria-describedby"),
3305                i.default(e.element).trigger(e.constructor.Event.HIDDEN),
3306                e._popper !== null && e._popper.destroy(),
3307                t && t();3308            };
3309          if ((i.default(this.element).trigger(o), !o.isDefaultPrevented())) {
3310            if (