calvinmetcalf / leaflet-ajax

plugin for leaflet for ajax
https://calvinmetcalf.github.io/leaflet-ajax/example/
MIT License
365 stars 189 forks source link

Error: TypeError: can't define property "Promise": Object is not extensible ( leaflet.ajax.js:513:1 ) #49

Open scottydelta opened 7 years ago

scottydelta commented 7 years ago

I am getting error on this code/setup, am I missing something?

<html>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.1.0/leaflet-src.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-ajax/2.1.0/leaflet.ajax.js"></script>
</body>
</html>
calvinmetcalf commented 7 years ago

what is your environment you're running this in?

Minganie commented 7 years ago

I have the same issue. For my part I put the scripts in the head section. I am running it in Firefox 54.0.1 (32-bit). I get the same error in Chrome 59.0.3071.115 64 bit. Do you need other details about the environment?

pmacMaps commented 7 years ago

I think this error was introduced at Leaflet 1.1.0. I noticed it on an app I recently upgraded, but don't notice it when using 1.0.3.

calvinmetcalf commented 7 years ago

yeah I have a pull request on leaflet to fix this regression

scottydelta commented 7 years ago

I have downgraded my Leaflet to 1.0.3 for now to make it work. Thanks @calvinmetcalf for a quick response.

asecondwill commented 7 years ago

@calvinmetcalf - can you ref that pull request here please? want to know if i can go with 1.2 or back to 1.0.3

asecondwill commented 7 years ago

just tried it with leaflet 1.2 - works for me.