Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

404
Vistas
Warning: Array.prototype.reduce() expects a return value from arrow function
const singleParams = [...appliedFilters].reduce((prev, curr) => {
    if (curr.key !== "multi")
        return { ...prev, ...curr.selectedValue.params };
    return;
}, {});

The following function is giving me the following warning in my console.

Line 22:13: Array.prototype.reduce() expects a return value from arrow function array-callback-return

I can't ignore it since I won't be able to deploy with warnings. How do I fix it?

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You need to return prev in else block

  const singleParams = [...appliedFilters].reduce((prev, curr) => {
        if (curr.key !== "multi")
            return { ...prev, ...curr.selectedValue.params };
        return prev;
    }, {});
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda