• foxglove (she/her)
    link
    fedilink
    English
    156 days ago

    if it’s 'FILE_NOT_FOUND' then the string will be read as truthy and you will get 'User is admin' logged.

    • Björn Tantau
      link
      fedilink
      306 days ago

      Ackshually three equal signs check for type as well. So mere truthiness is not enough. It has to be exactly true.

      Also, everyone knows FILE_NOT_FOUND isn’t a string but a boolean value.

      • foxglove (she/her)
        link
        fedilink
        English
        16 days ago

        yeah, it’s funny how my brain collapsed the boolean check into if (role) rather than if (role === true) - that’s tricky

        what is FILE_NOT_FOUND? I can’t find much on it …