From 9cbf6217d7339b11205f1d6b3838b2ac96e47b44 Mon Sep 17 00:00:00 2001 From: Eduard Popov Date: Thu, 8 Sep 2016 12:26:27 +1000 Subject: [PATCH] Fix way disappearing due to invalid "layer" tag Hello. Now layer() returns only a finite number, not NaN. /* Chrome 53 */ --- modules/core/way.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/way.js b/modules/core/way.js index 91f50670a..28458b207 100644 --- a/modules/core/way.js +++ b/modules/core/way.js @@ -68,7 +68,7 @@ _.extend(Way.prototype, { layer: function() { // explicit layer tag, clamp between -10, 10.. - if (this.tags.layer !== undefined) { + if (isFinite(this.tags.layer)) { return Math.max(-10, Math.min(+(this.tags.layer), 10)); }