Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

78
Vistas
Arrow function should not return assignment in find array

I have the following line

    shareViewMetadata.sharedWith = [sharedWith.find((recipient) => (recipient.id = userId)) as UserView];

That gets the linting error: Arrow function should not return assignment no-return-assign How could I fix it?

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

(recipient.id = userId)

should be

(recipient.id == userId)
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos