willtheorangeguy / Note-Style-Guide

Logical operator can be refactored to optional chain JS-W1044
Anti-pattern
Minor
5 months ago5 months old
Prefer using an optional chain expression instead, as it's more concise and easier to read
 4015              t = null != i && i + "queueHooks",
 4016              n = S.timers,
 4017              r = Y.get(this);
 4018            if (t) r[t] && r[t].stop && a(r[t]); 4019            else for (t in r) r[t] && r[t].stop && it.test(t) && a(r[t]);
 4020            for (t = n.length; t--; )
 4021              n[t].elem !== this ||
Prefer using an optional chain expression instead, as it's more concise and easier to read
 3914          for (r in (f &&
 3915            1 === e.nodeType &&
 3916            ((n.overflow = [h.overflow, h.overflowX, h.overflowY]),
 3917            null == (l = v && v.display) && (l = Y.get(e, "display")), 3918            "none" === (c = S.css(e, "display")) &&
 3919              (l
 3920                ? (c = l)
Prefer using an optional chain expression instead, as it's more concise and easier to read
 3908              if ("show" !== i || !v || void 0 === v[r]) continue;
 3909              g = !0;
 3910            }
 3911            d[r] = (v && v[r]) || S.style(e, r); 3912          }
 3913        if ((u = !S.isEmptyObject(t)) || !S.isEmptyObject(d))
 3914          for (r in (f &&
Prefer using an optional chain expression instead, as it's more concise and easier to read
 3675          (this.now = (this.end - this.start) * t + this.start),
 3676          this.options.step &&
 3677            this.options.step.call(this.elem, this.now, this),
 3678          n && n.set ? n.set(this) : Ke.propHooks._default.set(this), 3679          this
 3680        );
 3681      },
Prefer using an optional chain expression instead, as it's more concise and easier to read
 3673                ))
 3674            : (this.pos = t = e),
 3675          (this.now = (this.end - this.start) * t + this.start),
 3676          this.options.step && 3677            this.options.step.call(this.elem, this.now, this), 3678          n && n.set ? n.set(this) : Ke.propHooks._default.set(this),
 3679          this
 3680        );