Throw error on NaN circle radius, #4235
Iván Sánchez Ortega
8 years ago
4 | 4 |
L.Circle = L.Path.extend({
|
5 | 5 |
initialize: function (latlng, radius, options) {
|
6 | 6 |
L.Path.prototype.initialize.call(this, options);
|
|
7 |
|
|
8 |
if (isNaN(radius)) { throw new Error('Circle radius cannot be NaN'); }
|
7 | 9 |
|
8 | 10 |
this._latlng = L.latLng(latlng);
|
9 | 11 |
this._mRadius = radius;
|