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

317
Views
Reaccionar: TypeError: no se puede leer la propiedad 'getItem' de nulo

Creé una aplicación React simple y agregué un banner. Pero recibo mucho este error en Sentry de los usuarios.

No se pueden leer las propiedades de null (leyendo 'getItem');

si alguien sabe cual es el problema que me diga por favor

 setTimeout(() => { const banner = document.getElementById("banner"); if (!window.localStorage?.getItem("seen")) { const button = document.getElementById("hide"); if(button){ button.addEventListener('click', () => { window.localStorage?.setItem("seen", 'true'); banner.style.bottom = "-10vh"; setTimeout(() => banner.remove(), 2000); }); banner.style.removeProperty("visibility"); setTimeout(() => banner.style.removeProperty("bottom"), 100); } } else banner?.remove(); }, 2000);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Esa es probablemente la clave: el valor getItem está vacío o indefinido en el almacenamiento local, por lo tanto, obtiene ese error, vaya al almacenamiento local en el navegador y verifique su par clave-valor en el almacenamiento local

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!