question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught TypeError: Cannot read property 'call' of undefined

See original GitHub issue

The demo at http://leaflet.github.io/Leaflet.draw/ is running on version L.drawVersion="0.2.4-dev" and works as expected.

On version 0.3.0 though:

  1. Draw any shape.
  2. Click the edit button.
  3. Click anywhere on the map other than the shape.

And you get leaflet.js:6 Uncaught TypeError: Cannot read property 'call' of undefined

https://jsfiddle.net/caioiglesias/pspsk5L3/

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tiagogmcommented, Jun 30, 2016

Hi,

I can confirm this is happening to me too, I may be wrong, but I believe this is because of a recent commit that attached an ‘click’ event handler with non-existent function callback.

https://github.com/Leaflet/Leaflet.draw/commit/88271ea62691f4f575289da76cf836731635f5a8#diff-8096a3175ddafb1620d59064f291af37R75

The this._editStyle callback is undefined, thus causing the click event to throw the error

0reactions
mmasruhin28commented, Feb 26, 2020

i cant get i in function, console.log show count of data

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'call' of undefined ...
One of the solution was to use concatenateModules: false apparently, but to no avail, it didn't solve my issue. So I tried with...
Read more >
Uncaught TypeError: Cannot read property 'call' of undefined
I'm having an issue with webpack where if I stop watching and restart, it will build just fine, but if I edit a...
Read more >
Uncaught TypeError: Cannot read property 'call' of ... - Laracasts
You need to show us your code that is causing the error. It's pointing to my vue component, I excluded it from app....
Read more >
Cannot read property 'call' of undefined" error occurs when an ...
HtmlEditor - The " __webpack_require__ => Uncaught TypeError: Cannot read property 'call' of undefined" error occurs when an application with ...
Read more >
TypeError: Cannot read property 'call' of undefined
Error: Cannot read property 'call' of undefined. Looking at the Chrome console: Me @ react-dom.min.js?ver=16.13.1:9 Jh.c.payload ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found