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 })();
4082 }
4083 t.setAttribute("aria-expanded", !0);
4084 }
4085 n && n();4086 }),
4087 (t._jQueryInterface = function (e) {
4088 return this.each(function () {
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))
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))
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 (
The optional chaining operator can be used to perform null checks before accessing a property, or calling a function.
Using &&
for this purpose is no longer required.
function getUsernameFromId(id: number): string | undefined {
const user = db.getUser(id)
return user && user.name
}
someFunc && someFunc()
// ^~~~ not necessary
maybeArray && maybeArray[index]
// ^~~~ not necessary
function getUsernameFromId(id: number): string | undefined {
const user = db.getUser(id)
return user?.name
}
someFunc?.()
maybeArray?.[index]