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

339
Views
TypeError: no se pueden leer las propiedades de nulo (leyendo '_leaflet_disable_click')

Estoy usando react-leaflet leaflet con nextjs y tengo marcadores, dentro de las ventanas emergentes de estos marcadores hay un botón que abre otra página al hacer clic, pero recibo este error al abrir otra página:

 Unhandled Runtime Error TypeError: Cannot read properties of null (reading '_leaflet_disable_click') Call Stack NewClass._isClickDisabled node_modules/leaflet/dist/leaflet-src.js (4350:0) NewClass._handleDOMEvent node_modules/leaflet/dist/leaflet-src.js (4357:0) HTMLDivElement.handler node_modules/leaflet/dist/leaflet-src.js (2692:0)

La llamada de otra página funciona normalmente, pero este error se muestra mientras no estoy llamando a _leaflet_disable_click ningún lado y no estoy seguro de dónde viene:

 const handleOpen = (e, entry) => { e.preventDefault() setFormData({ id: entry.id, topic: entry.topic, field: entry.field, officer: entry.officer, date: entry.date, fresh: entry.fresh, createdAt: entry.createdAt, createdBy: entry.createdBy, level: entry.level, category: entry.category, type: entry.type, lat: entry.lat, lng: entry.lng, expiresAt: entry.expiresAt }) router.push(`?page=${router.query.page}&form=news_form&id=${entry.id}`, undefined, {shallow: true}) }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede solucionarlo llamando a e.stopPropagation() cuando se active el evento de clic del botón, por lo que en su caso lo agregará aquí:

 const handleOpen = (e, entry) => { e.stopPropagation() e.preventDefault() ... router.push(`?page=${router.query.page}&form=news_form&id=${entry.id}`, undefined, {shallow: true}) }

Esto también evitará la necesidad de hacer doble clic para abrir la nueva página.

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!