• dave@feddit.uk
    cake
    link
    fedilink
    English
    arrow-up
    6
    ·
    9 days ago

    You missed a ‘?’ I think you meant:

    input?.map?.(item => …

    • python@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      9 days ago

      oh, you’re right lol
      The first ?. after input would be more more of a safeguard against input being null/undefined and the .map not existing on it would have to have another ?.