• SzethFriendOfNimi
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    Try changing to const === variable. That’s most likely what’s it doing to minimize the risk of accidental assignment.

    • kevincox@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Wut? This is an automated optimizer. It is not worried about accidental assignment.

      • SzethFriendOfNimi
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        I agree it shouldn’t. But I’ve seen linters that automatically change it since they seem to be forcing practical conventions sometimes.