Always use === to compare with 0

This commit is contained in:
Tom Payne
2014-03-23 18:29:47 +01:00
parent 7f5446afff
commit 35dea5e3a6
3 changed files with 3 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ ol.coordinate.closestOnSegment = function(coordinate, segment) {
var y2 = end[1];
var dx = x2 - x1;
var dy = y2 - y1;
var along = (dx == 0 && dy == 0) ? 0 :
var along = (dx === 0 && dy === 0) ? 0 :
((dx * (x0 - x1)) + (dy * (y0 - y1))) / ((dx * dx + dy * dy) || 0);
var x, y;
if (along <= 0) {