Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
JS: no se puede establecer la propiedad de indefinido

Mi código:

 module.exports = async (req, res, next) => { const redirectURL = ((req.originalUrl.includes("login") || req.originalUrl === "/") ? "/selector" : req.originalUrl); if(req.session.user){ return next(); } else { const state = Math.random().toString(36).substring(5); req.client.states[state] = redirectURL; return res.redirect(`/api/login?state=${state}`); } };

Dame este error:

No se pueden establecer propiedades de indefinido (estableciendo 'yhgrz0jg')

Alguien me puede ayudar he probado de todo y no puedo solucionarlo?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

req.client.states no está definido, es por eso que está recibiendo un error. ¿Por qué lo está configurando de todos modos, ya que no está usando ese valor en ningún lugar más adelante?

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!