mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 13:18:15 +02:00
Fix way disappearing due to invalid "layer" tag
Hello. Now layer() returns only a finite number, not NaN. /* Chrome 53 */
This commit is contained in:
+1
-1
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user