Beakerboy / OSMBuilding

render an individual OSM building
MIT License
43 stars 5 forks source link

Roof direction check for skillion #60

Open justinormont opened 1 month ago

justinormont commented 1 month ago

The !this.options.roof.direction should instead check for null/undefined: https://github.com/Beakerboy/OSMBuilding/blob/228874c2e9cfeb80f8619d52591ab5bbe85a1789/src/buildingpart.js#L179

In JavaScript, 0 is nullish, causing this warning to be printed, if you set the direction of a skillion roof to 0 (north-facing roof).

Expected behavior:

Since 0 is an acceptable roof direction, no warning should be printed.

Impact:

Minor, since I think it only causes a warning.