[Pkg-javascript-commits] [leaflet] 53/78: Throw error on NaN circle radius, #4235

Jonas Smedegaard dr at jones.dk
Sat May 7 08:58:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet.

commit d8c51ad7e238a4e5e4aa339731d02f8a93692c00
Author: Iván Sánchez Ortega <ivan at mazemap.no>
Date:   Mon Feb 15 10:19:13 2016 +0100

    Throw error on NaN circle radius, #4235
---
 src/layer/vector/Circle.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/layer/vector/Circle.js b/src/layer/vector/Circle.js
index abdd8bc..386605d 100644
--- a/src/layer/vector/Circle.js
+++ b/src/layer/vector/Circle.js
@@ -6,6 +6,8 @@ L.Circle = L.Path.extend({
 	initialize: function (latlng, radius, options) {
 		L.Path.prototype.initialize.call(this, options);
 
+		if (isNaN(radius)) { throw new Error('Circle radius cannot be NaN'); }
+
 		this._latlng = L.latLng(latlng);
 		this._mRadius = radius;
 	},

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list